Module Name: xsrc
Committed By: christos
Date: Fri Jan 4 18:59:45 UTC 2019
Modified Files:
xsrc/external/mit/libXxf86dga/dist/src: XF86DGA.c
Log Message:
use a destructor instead of atexit(3) to prevent SEGV's after dlclose.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c
diff -u xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c:1.1.1.4 xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c:1.2
--- xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c:1.1.1.4 Fri May 31 05:19:59 2013
+++ xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c Fri Jan 4 13:59:45 2019
@@ -647,6 +647,9 @@ XF86DGADirectVideo(
static void
+#ifdef __NetBSD__
+__attribute__ ((__destructor__))
+#endif
XF86cleanup(int sig)
{
ScrPtr sp;
@@ -703,7 +706,9 @@ XF86DGAGetVideo(
if (!beenHere) {
beenHere = 1;
+#ifndef __NetBSD__
atexit((void(*)(void))XF86cleanup);
+#endif
/* one shot XF86cleanup attempts */
signal(SIGSEGV, XF86cleanup);
#ifdef SIGBUS