From 165d10de0f84d090c1a79f042301c031e68d47cd Mon Sep 17 00:00:00 2001 From: Ante Vojvodic Date: Mon, 6 Oct 2014 18:38:17 +0200 Subject: [PATCH 1/2] Fix build on illumos. --- configure.ac | 12 ++++++++++++ src/portable_endian.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3f7f413..37b1e2b 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,18 @@ echo "nanosleep() required for timing operations." exit 1 ]) +# On illumos we need -lsocket +AC_SEARCH_LIBS(socket, [socket], [], [ +echo "socket()" +exit 1 +]) + +# On illumos inet_ntop in in -lnsl +AC_SEARCH_LIBS(inet_ntop, [nsl], [], [ +echo "inet_ntop()" +exit 1 +]) + # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST diff --git a/src/portable_endian.h b/src/portable_endian.h index 520c79a..2f4afcb 100644 --- a/src/portable_endian.h +++ b/src/portable_endian.h @@ -55,7 +55,7 @@ # include -#elif defined(__SunOS) +#elif defined(__SunOS) || defined(__sun) # include # include From a565fa6b27601d14eb112ba4b77e9d76557ebc7e Mon Sep 17 00:00:00 2001 From: Ante Vojvodic Date: Thu, 16 Oct 2014 18:01:29 +0200 Subject: [PATCH 2/2] Identify Solaris based OS. --- src/portable_endian.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/portable_endian.h b/src/portable_endian.h index 2f4afcb..c7cb852 100644 --- a/src/portable_endian.h +++ b/src/portable_endian.h @@ -55,7 +55,7 @@ # include -#elif defined(__SunOS) || defined(__sun) +#elif defined(__sun) && defined(__SVR4) # include # include