From 0caea3cd3c436a68eb5231478e951bafbe1e1b71 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 24 Aug 2025 19:34:02 -0700 Subject: Improve tests for SUNOS socketpair. --- src/platform/posix/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/platform') 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. -- cgit v1.2.3-70-g09d2