summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-10-11 21:01:38 +0000
committerChris Wilson <chris+github@qwirx.com>2008-10-11 21:01:38 +0000
commitec5d4ab2b2cf334240673ca918ed1240a6dfb4b8 (patch)
treebfb4d5297246408480d7d6f7ebb062a8237eed5d /configure.ac
parent23221c54b485a4b7625d43987ba44cf2278a4f12 (diff)
Use getpeerucred() to identify connecting socket clients on Solaris,
and silence warnings that the peer cannot be identified on this platform. Remove another use of uname -o which doesn't work on Solaris.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index d83c601c..e7f2f8fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,6 +182,10 @@ AC_CHECK_DECLS([INFTIM],,, [[#include <poll.h>]])
AC_CHECK_DECLS([SO_PEERCRED],,, [[#include <sys/socket.h>]])
AC_CHECK_DECLS([O_BINARY],,,)
+# Solaris provides getpeerucred() instead of getpeereid() or SO_PEERCRED
+AC_CHECK_HEADERS([ucred.h])
+AC_CHECK_FUNCS([getpeerucred])
+
AC_CHECK_DECLS([optreset],,, [[#include <getopt.h>]])
AC_CHECK_DECLS([dirfd],,,
[[
@@ -311,10 +315,9 @@ build_dir=`dirname $0`
build_dir=`cd $build_dir && pwd`
client_parcel_dir=`perl infrastructure/parcelpath.pl backup-client $target_os`
-os_name=`uname -o`
-if test "$os_name" = "Cygwin"; then
+if test "$build_os" = "cygwin"; then
client_parcel_dir=`cygpath -wa $client_parcel_dir | sed -e 's|\\\|/|g'`
- build_dir=`cygpath -wa $build_dir | sed -e 's|\\\|/|g'`
+ build_dir=` cygpath -wa $build_dir | sed -e 's|\\\|/|g'`
fi
AC_SUBST([client_parcel_dir])