ports/devel/dbus/files/patch-dbus_dbus-sysdeps-util-unix.c
Joe Marcus Clarke 7b1e0fc980 Add a missing #include to correct a problem where dbus would refuse to
launch if /usr/local or /usr/X11R6 were NFS mounts.  The error seen would be:

Failed to start message bus: Can't calculate buffer size when reading directory

Approved by:	portmgr (implicit)
2006-10-27 02:05:30 +00:00

19 lines
617 B
C

--- dbus/dbus-sysdeps-util-unix.c.orig Thu Oct 26 22:02:29 2006
+++ dbus/dbus-sysdeps-util-unix.c Thu Oct 26 22:02:52 2006
@@ -42,6 +42,7 @@
#include <sys/socket.h>
#include <dirent.h>
#include <sys/un.h>
+#include <limits.h>
#ifndef O_BINARY
#define O_BINARY 0
@@ -502,7 +503,7 @@ static dbus_bool_t
dirent_buf_size(DIR * dirp, size_t *size)
{
long name_max;
-# if defined(HAVE_FPATHCONF) && defined(HAVE_DIRFD) \
+# if defined(HAVE_FPATHCONF) && ( defined(HAVE_DIRFD) || defined(dirfd) )\
&& defined(_PC_NAME_MAX)
name_max = fpathconf(dirfd(dirp), _PC_NAME_MAX);
if (name_max == -1)