@@ -16,6 +16,10 @@ if(C_SUPPORTS_WUNGUARDED_AVAILABILITY)
1616 set (CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unguarded-availability" )
1717endif ()
1818
19+ if (HOST_SOLARIS)
20+ set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DHOST_SOLARIS -D__EXTENSIONS__ -D_XPG4_2" )
21+ endif ()
22+
1923function (ac_check_headers )
2024 foreach (arg ${ARGN} )
2125 check_include_file ("${arg} " FOUND_${arg} )
@@ -66,7 +70,7 @@ ac_check_headers (
6670
6771ac_check_funcs (
6872 sigaction kill clock_nanosleep kqueue backtrace_symbols mkstemp mmap
69- madvise getrusage dladdr sysconf getrlimit prctl nl_langinfo
73+ getrusage dladdr sysconf getrlimit prctl nl_langinfo
7074 sched_getaffinity sched_setaffinity getpwuid_r readlink chmod lstat getdtablesize ftruncate msync
7175 getpeername utime utimes openlog closelog atexit popen strerror_r inet_pton inet_aton
7276 shm_open poll getfsstat mremap posix_fadvise vsnprintf sendfile statfs statvfs setpgid system
@@ -89,6 +93,7 @@ ac_check_funcs(
8993 pthread_attr_setstacksize pthread_get_stackaddr_np
9094)
9195
96+ check_symbol_exists (madvise "sys/mman.h" HAVE_MADVISE )
9297check_symbol_exists (pthread_mutexattr_setprotocol "pthread.h" HAVE_DECL_PTHREAD_MUTEXATTR_SETPROTOCOL )
9398check_symbol_exists (CLOCK_MONOTONIC "time.h" HAVE_CLOCK_MONOTONIC )
9499check_symbol_exists (CLOCK_MONOTONIC_COARSE "time.h" HAVE_CLOCK_MONOTONIC_COARSE )
@@ -164,3 +169,9 @@ endif()
164169if (HOST_BROWSER)
165170 set (HAVE_FORK 0)
166171endif ()
172+
173+ if (HOST_SOLARIS)
174+ set (HAVE_GETPROTOBYNAME 1)
175+ set (HAVE_NETINET_TCP_H 1)
176+ set (HAVE_GETADDRINFO 1)
177+ endif ()
0 commit comments