open-src/xserver/xorg/catch-dlerrors.patch
changeset 705 24ca414edbff
parent 660 457a0e9b07d7
--- a/open-src/xserver/xorg/catch-dlerrors.patch	Thu May 14 20:00:54 2009 -0700
+++ b/open-src/xserver/xorg/catch-dlerrors.patch	Fri May 15 09:36:46 2009 -0700
@@ -31,20 +31,35 @@
 Catch errors loading libraries at runtime so we can clean up when a lazyloaded
 library fails to open correctly.
 
---- os/osinit.c	2008-11-05 08:52:17.000000000 -0800
-+++ os/osinit.c	2009-03-05 14:44:17.792553000 -0800
-@@ -54,6 +54,8 @@
+diff -urp -x '*~' -x '*.orig' configure.ac configure.ac
+--- configure.ac	2009-05-08 17:42:50.197784000 -0700
++++ configure.ac	2009-05-08 17:42:58.915352000 -0700
+@@ -101,7 +101,7 @@ AM_CONDITIONAL(XSERVER_DTRACE, [test "x$
+ 
+ AC_HEADER_DIRENT
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
++AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h dlfcn.h])
+ 
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+diff -urp -x '*~' -x '*.orig' os/osinit.c os/osinit.c
+--- os/osinit.c	2009-04-14 10:14:57.000000000 -0700
++++ os/osinit.c	2009-05-08 17:42:58.916721000 -0700
+@@ -54,6 +54,10 @@ SOFTWARE.
  #include "os.h"
  #include "osdep.h"
  #include <X11/Xos.h>
-+#include <dlfcn.h>
++#ifdef HAVE_DLFCN_H
++# include <dlfcn.h>
++#endif
 +#include <signal.h>
  
- #ifdef SMART_SCHEDULE
  #include "dixstruct.h"
-@@ -92,6 +94,17 @@
  
- Bool OsDelayInitColors = FALSE;
+@@ -88,6 +92,17 @@ int limitStackSpace = -1;
+ int limitNoFile = -1;
+ #endif
  
 +static void OsSigHandler(int signo)
 +{
@@ -60,7 +75,7 @@
  void
  OsInit(void)
  {
-@@ -100,6 +113,16 @@
+@@ -96,6 +111,16 @@ OsInit(void)
      static char* devnull = "/dev/null";
      char fname[PATH_MAX];