diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2006-10-08 16:56:50 +0000 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2006-10-08 16:56:50 +0000 |
commit | c6465198ecfcd52e0b04b3e977273e7ce71af944 (patch) | |
tree | a1231a68bfded44a125bf17c7887ec37d28b600a /dbus/dbus-sysdeps-util-unix.c | |
parent | ff99239bd429cb3335406dff1761a0a54ad2996b (diff) |
* 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>)
Diffstat (limited to 'dbus/dbus-sysdeps-util-unix.c')
-rw-r--r-- | dbus/dbus-sysdeps-util-unix.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c index 98c8992b..57c943d2 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; |