From: John (J5) Palmieri Date: Sun, 8 Oct 2006 16:56:50 +0000 (+0000) Subject: * configure.in: define _POSIX_PTHREAD_SEMANTICS on solaris X-Git-Tag: dbus-0.94~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6465198ecfcd52e0b04b3e977273e7ce71af944;p=thirdparty%2Fdbus.git * configure.in: define _POSIX_PTHREAD_SEMANTICS on solaris avoid using dirfd on systems that don't have dirfd (Patch by Brian Cameron ) --- diff --git a/ChangeLog b/ChangeLog index ec7419506..47737aea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-08 John (J5) Palmieri + + * configure.in: define _POSIX_PTHREAD_SEMANTICS on solaris + avoid using dirfd on systems that don't have dirfd + (Patch by Brian Cameron ) + 2006-10-02 John (J5) Palmieir * dbus/dbus-sysdeps.c (_dbus_abort): Remove from diff --git a/configure.in b/configure.in index b3a50ecb8..867b9fe9b 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c index 98c8992b8..57c943d21 100644 --- a/dbus/dbus-sysdeps-util-unix.c +++ b/dbus/dbus-sysdeps-util-unix.c @@ -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;