Commit c6465198 authored by John Palmieri's avatar John Palmieri

* 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>)
parent ff99239b
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> 2006-10-02 John (J5) Palmieir <johnp@redhat.com>
* dbus/dbus-sysdeps.c (_dbus_abort): Remove from * dbus/dbus-sysdeps.c (_dbus_abort): Remove from
......
...@@ -228,6 +228,13 @@ else ...@@ -228,6 +228,13 @@ else
fi fi
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 AM_PROG_LIBTOOL
changequote(,)dnl changequote(,)dnl
......
...@@ -507,9 +507,12 @@ static dbus_bool_t ...@@ -507,9 +507,12 @@ static dbus_bool_t
dirent_buf_size(DIR * dirp, size_t *size) dirent_buf_size(DIR * dirp, size_t *size)
{ {
long name_max; long name_max;
# if defined(HAVE_FPATHCONF) && defined(HAVE_DIRFD) \ # if defined(HAVE_FPATHCONF) && defined(_PC_NAME_MAX)
&& defined(_PC_NAME_MAX) # if defined(HAVE_DIRFD)
name_max = fpathconf(dirfd(dirp), _PC_NAME_MAX); 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 (name_max == -1)
# if defined(NAME_MAX) # if defined(NAME_MAX)
name_max = NAME_MAX; name_max = NAME_MAX;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment