diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-10-11 21:01:38 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-10-11 21:01:38 +0000 |
commit | ec5d4ab2b2cf334240673ca918ed1240a6dfb4b8 (patch) | |
tree | bfb4d5297246408480d7d6f7ebb062a8237eed5d /lib/common/BoxPlatform.h | |
parent | 23221c54b485a4b7625d43987ba44cf2278a4f12 (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 'lib/common/BoxPlatform.h')
-rw-r--r-- | lib/common/BoxPlatform.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h index 3af893b7..4f7a587c 100644 --- a/lib/common/BoxPlatform.h +++ b/lib/common/BoxPlatform.h @@ -72,10 +72,14 @@ #endif // Find out if credentials on UNIX sockets can be obtained -#ifndef HAVE_GETPEEREID - #if !HAVE_DECL_SO_PEERCRED - #define PLATFORM_CANNOT_FIND_PEER_UID_OF_UNIX_SOCKET - #endif +#ifdef HAVE_GETPEEREID + // +#elif HAVE_DECL_SO_PEERCRED + // +#elif HAVE_UCRED_H && HAVE_GETPEERUCRED + // +#else + #define PLATFORM_CANNOT_FIND_PEER_UID_OF_UNIX_SOCKET #endif #ifdef HAVE_DEFINE_PRAGMA |