From a73725579107e374eb8358a3999d03b822df6c89 Mon Sep 17 00:00:00 2001 From: Edward Humes <29870961+aurxenon@users.noreply.github.com> Date: Tue, 22 Nov 2022 15:46:55 -0500 Subject: [PATCH] build: don't use ifaddrs.h on solaris 10 (#3826) Disable usage of ifaddrs.h on Solaris 10 at configuration time. --- CMakeLists.txt | 4 ++++ configure.ac | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d2b4e44c..a8d8d3b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -374,6 +374,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS400") endif() if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") + if(CMAKE_SYSTEM_VERSION STREQUAL "5.10") + list(APPEND uv_defines SUNOS_NO_IFADDRS) + list(APPEND uv_libraries rt) + endif() list(APPEND uv_defines __EXTENSIONS__ _XOPEN_SOURCE=500 _REENTRANT) list(APPEND uv_libraries kstat nsl sendfile socket) list(APPEND uv_sources diff --git a/configure.ac b/configure.ac index 0f272561..a380cd97 100644 --- a/configure.ac +++ b/configure.ac @@ -76,6 +76,9 @@ AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false]) AS_CASE([$host_os],[mingw*], [ LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv -luser32" ]) +AS_CASE([$host_os], [solaris2.10], [ + CFLAGS="$CFLAGS -DSUNOS_NO_IFADDRS" +]) AS_CASE([$host_os], [netbsd*], [AC_CHECK_LIB([kvm], [kvm_open])]) AS_CASE([$host_os], [kfreebsd*], [ LIBS="$LIBS -lfreebsd-glue"