aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-08-24 19:34:02 -0700
committerGarrett D'Amore <garrett@damore.org>2025-08-24 19:34:02 -0700
commit0caea3cd3c436a68eb5231478e951bafbe1e1b71 (patch)
treee530997b036dceb168eeb0b6607bc38f8ce4eceb
parent573c93462a7a05e25d087df0a15a14937d48bd55 (diff)
downloadnng-0caea3cd3c436a68eb5231478e951bafbe1e1b71.tar.gz
nng-0caea3cd3c436a68eb5231478e951bafbe1e1b71.tar.bz2
nng-0caea3cd3c436a68eb5231478e951bafbe1e1b71.zip
Improve tests for SUNOS socketpair.
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/platform/posix/CMakeLists.txt10
2 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7d80ba3b..1f5c49f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -268,6 +268,7 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "SunOS")
add_definitions(-DNNG_PLATFORM_POSIX)
add_definitions(-DNNG_PLATFORM_SUNOS)
set(NNG_PLATFORM_POSIX ON)
+ set(NNG_PLATFORM_SUNOS ON)
elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DNNG_PLATFORM_WINDOWS)
diff --git a/src/platform/posix/CMakeLists.txt b/src/platform/posix/CMakeLists.txt
index b8fb665a..ace04284 100644
--- a/src/platform/posix/CMakeLists.txt
+++ b/src/platform/posix/CMakeLists.txt
@@ -42,8 +42,14 @@ if (NNG_PLATFORM_POSIX)
nng_check_lib(pthread pthread_atfork NNG_HAVE_PTHREAD_ATFORK_PTHREAD)
nng_check_lib(pthread pthread_set_name_np NNG_HAVE_PTHREAD_SET_NAME_NP)
nng_check_lib(pthread pthread_setname_np NNG_HAVE_PTHREAD_SETNAME_NP)
- nng_check_lib(nsl gethostbyname NNG_HAVE_LIBNSL)
- nng_check_lib(socket socket NNG_HAVE_LIBSOCKET)
+ if (NNG_PLATFORM_SUNOS)
+ nng_defines(NNG_HAVE_SOCKETPAIR)
+ nng_check_lib(nsl gethostbyname NNG_HAVE_LIBNSL)
+ nng_check_lib(socket socket NNG_HAVE_LIBSOCKET)
+ else()
+ nng_check_lib(nsl gethostbyname NNG_HAVE_LIBNSL)
+ nng_check_lib(socket socket NNG_HAVE_LIBSOCKET)
+ endif()
# GCC needs libatomic on some architectures (e.g. ARM) because the
# underlying architecture may lack the necessary atomic primitives.