summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--configure.in16
-rw-r--r--dbus/dbus-sysdeps.c4
-rw-r--r--test/test-segfault.c1
-rw-r--r--tools/Makefile.am2
5 files changed, 33 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 75a82351..9a0294d5 100644
--- 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
diff --git a/configure.in b/configure.in
index 613bf2dc..a51f8157 100644
--- a/configure.in
+++ b/configure.in
@@ -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)])
diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c
index be867a9d..5311b202 100644
--- a/dbus/dbus-sysdeps.c
+++ b/dbus/dbus-sysdeps.c
@@ -62,6 +62,10 @@
#define O_BINARY 0
#endif
+#ifndef HAVE_SOCKLEN_T
+#define socklen_t int
+#endif
+
/**
* @addtogroup DBusInternalsUtils
* @{
diff --git a/test/test-segfault.c b/test/test-segfault.c
index dad0b589..94b42749 100644
--- a/test/test-segfault.c
+++ b/test/test-segfault.c
@@ -1,6 +1,7 @@
/* This is simply a process that segfaults */
#include <signal.h>
+#include <sys/time.h>
#include <sys/resource.h>
int
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 04148bc7..80957854 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -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