Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxillo/b5a6960b4e3fd6154f9384a26cf8d150 to your computer and use it in GitHub Desktop.
Save tuxillo/b5a6960b4e3fd6154f9384a26cf8d150 to your computer and use it in GitHub Desktop.
[PATCH] Attempt to fix build in SunOS-like environments.
From c269b75d94efdfeb15beaea338416a7c3624ec46 Mon Sep 17 00:00:00 2001
From: Antonio Huete Jimenez <tuxillo@quantumachine.net>
Date: Mon, 9 Jan 2017 19:54:58 +0000
Subject: [PATCH] Attempt to fix build in SunOS-like environments.
---
CMakeLists.txt | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9a049b0..25bc680 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,6 +84,26 @@ else (HAVE_UUID_UNPARSE_LOWER)
message ("-- Found libuuid, using internal uuid_unparse_lower")
endif (HAVE_UUID_UNPARSE_LOWER)
+if (SOLARIS)
+ # accept() is in libsocket according to its manpage
+ message("-- Looking for libsocket")
+ find_library (SOCKET_LIBRARY NAMES socket)
+ if (SOCKET_LIBRARY)
+ set (TASKD_LIBRARIES ${TASKD_LIBRARIES} ${SOCKET_LIBRARY})
+ else (SOCKET_LIBRARY)
+ message(FATAL_ERROR "-- libsocket not found.")
+ endif (SOCKET_LIBRARY)
+
+ # inet_ntop() is in libnsl according to its manpage
+ message("-- Looking for libnsl")
+ find_library (NSL_LIBRARY NAMES nsl)
+ if (NSL_LIBRARY)
+ set (TASKD_LIBRARIES ${TASKD_LIBRARIES} ${NSL_LIBRARY})
+ else (NSL_LIBRARY)
+ message(FATAL_ERROR "-- libnsl not found.")
+ endif (NSL_LIBRARY)
+endif (SOLARIS)
+
# Set the package language.
if (LANGUAGE)
set (PACKAGE_LANGUAGE ${LANGUAGE})
--
2.10.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment