Created
January 15, 2017 11:12
-
-
Save tuxillo/bc5b636f0b2be61d5779b9cf5d70e603 to your computer and use it in GitHub Desktop.
Attempt to fix build in SunOS-like environments.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 9781bb06fc4f3c3f2c311099f962e5e61eed31ed Mon Sep 17 00:00:00 2001 | |
From: Antonio Huete Jimenez <[email protected]> | |
Date: Sat, 14 Jan 2017 00:17:33 +0000 | |
Subject: [PATCH] task: Fix build in SunOS-like environments. | |
Tested in: | |
- OpenIndiana 2816291 | |
- OmniOS bed3013 | |
- SmartOS 20161129T003638Z | |
--- | |
CMakeLists.txt | 20 ++++++++++++++++++++ | |
1 file changed, 20 insertions(+) | |
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 4bf785e..5ca6cac 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -97,6 +97,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 (TASK_LIBRARIES ${TASK_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 (TASK_LIBRARIES ${TASK_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