Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/libXxf86dga/dist/src use a destructor instead...



details:   https://anonhg.NetBSD.org/xsrc/rev/ef09ea508fe2
branches:  trunk
changeset: 10078:ef09ea508fe2
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 04 18:59:45 2019 +0000

description:
use a destructor instead of atexit(3) to prevent SEGV's after dlclose.

diffstat:

 external/mit/libXxf86dga/dist/src/XF86DGA.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (23 lines):

diff -r 200cdfec3a2e -r ef09ea508fe2 external/mit/libXxf86dga/dist/src/XF86DGA.c
--- a/external/mit/libXxf86dga/dist/src/XF86DGA.c       Fri Jan 04 18:53:36 2019 +0000
+++ b/external/mit/libXxf86dga/dist/src/XF86DGA.c       Fri Jan 04 18:59:45 2019 +0000
@@ -647,6 +647,9 @@
 
 
 static void
+#ifdef __NetBSD__
+__attribute__ ((__destructor__))
+#endif
 XF86cleanup(int sig)
 {
     ScrPtr sp;
@@ -703,7 +706,9 @@
 
     if (!beenHere) {
        beenHere = 1;
+#ifndef __NetBSD__
        atexit((void(*)(void))XF86cleanup);
+#endif
        /* one shot XF86cleanup attempts */
        signal(SIGSEGV, XF86cleanup);
 #ifdef SIGBUS



Home | Main Index | Thread Index | Old Index