2003-06-15 Joe Shaw <joe@assbarn.com>
authorJoe Shaw <joeshaw@novell.com>
Sun, 15 Jun 2003 10:45:07 +0000 (10:45 +0000)
committerJoe Shaw <joeshaw@novell.com>
Sun, 15 Jun 2003 10:45:07 +0000 (10:45 +0000)
* configure.in: Check for socklen_t.

* dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.

* test/test-segfault.c: Add #include <sys/time.h>

* tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
dbus-launch needs it.

ChangeLog
configure.in
dbus/dbus-sysdeps.c
test/test-segfault.c
tools/Makefile.am

index 75a8235..9a0294d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-06-15  Joe Shaw  <joe@assbarn.com>
+
+       * configure.in: Check for socklen_t.
+
+       * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
+
+       * test/test-segfault.c: Add #include <sys/time.h>
+
+       * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
+       dbus-launch needs it.
+
 2003-06-09  Havoc Pennington  <hp@redhat.com>
 
        * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
index 613bf2d..a51f815 100644 (file)
@@ -273,6 +273,22 @@ else
        fi
 fi
 
+dnl check for socklen_t
+AC_MSG_CHECKING(whether socklen_t is defined)
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+],[
+socklen_t foo;
+foo = 1;
+],dbus_have_socklen_t=yes,dbus_have_socklen_t=no)
+AC_MSG_RESULT($dbus_have_socklen_t)
+
+if test "x$dbus_have_socklen_t" = "xyes"; then
+    AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type])
+fi
+
 dnl check for writev header and writev function so we're 
 dnl good to go if HAVE_WRITEV gets defined.
 AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
index be867a9..5311b20 100644 (file)
 #define O_BINARY 0
 #endif
 
+#ifndef HAVE_SOCKLEN_T
+#define socklen_t int
+#endif
+
 /**
  * @addtogroup DBusInternalsUtils
  * @{
index dad0b58..94b4274 100644 (file)
@@ -1,6 +1,7 @@
 /* This is simply a process that segfaults */
 #include <signal.h>
 
+#include <sys/time.h>
 #include <sys/resource.h>
 
 int
index 04148bc..8095785 100644 (file)
@@ -1,4 +1,4 @@
-INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS)
+INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_X_CFLAGS)
 
 if HAVE_GLIB
 GLIB_TOOLS=dbus-monitor