]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
* configure.in: define _POSIX_PTHREAD_SEMANTICS on solaris
authorJohn (J5) Palmieri <johnp@redhat.com>
Sun, 8 Oct 2006 16:56:50 +0000 (16:56 +0000)
committerJohn (J5) Palmieri <johnp@redhat.com>
Sun, 8 Oct 2006 16:56:50 +0000 (16:56 +0000)
  avoid using dirfd on systems that don't have dirfd
  (Patch by Brian Cameron <brian dot cameron at sun dot com>)

ChangeLog
configure.in
dbus/dbus-sysdeps-util-unix.c

index ec74195066b523ec8803caa9497627effedbe68a..47737aea38ad25e10e1828f63b7b6feee8f5400e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-08  John (J5) Palmieri  <johnp@redhat.com>
+
+       * configure.in: define _POSIX_PTHREAD_SEMANTICS on solaris
+       avoid using dirfd on systems that don't have dirfd 
+       (Patch by Brian Cameron <brian dot cameron at sun dot com>) 
+
 2006-10-02  John (J5) Palmieir  <johnp@redhat.com>
 
        * dbus/dbus-sysdeps.c (_dbus_abort): Remove from 
index b3a50ecb84db6aa548ba1e0c206bc56f5b020aad..867b9fe9b6217b02f90a42a09bb51e3bb9f8effa 100644 (file)
@@ -228,6 +228,13 @@ else
   fi
 fi
 
+# Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris
+#
+case $target_os in
+    solaris*)
+       CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;;
+esac
+    
 AM_PROG_LIBTOOL
 
 changequote(,)dnl
index 98c8992b8ab249d07cf40ebb4930348f4ecbf995..57c943d21420713d9323356bef21f453f53fcc63 100644 (file)
@@ -507,9 +507,12 @@ static dbus_bool_t
 dirent_buf_size(DIR * dirp, size_t *size)
 {
  long name_max;
-#   if defined(HAVE_FPATHCONF) && defined(HAVE_DIRFD) \
-    && defined(_PC_NAME_MAX)
-     name_max = fpathconf(dirfd(dirp), _PC_NAME_MAX);
+#   if defined(HAVE_FPATHCONF) && defined(_PC_NAME_MAX)
+#      if defined(HAVE_DIRFD)
+          name_max = fpathconf(dirfd(dirp), _PC_NAME_MAX);
+#      else
+          name_max = fpathconf(dirp->dd_fd, _PC_NAME_MAX);
+#      endif /* HAVE_DIRFD */
      if (name_max == -1)
 #           if defined(NAME_MAX)
             name_max = NAME_MAX;