The following diff updates the feature flags for Solaris / FreeBSD / NetBSD / OpenBSD.
Bump the baseline Solaris to 9 which intruduced closefrom(). FreeBSD 10 is already EOL for support but its the new baseline. Introduces accept4(). Enable getaddrinfo(). The FreeBSD port enables these. OpenBSD 6.3 is pretty old but it brings a compiler that supports TLS for the threads support. 5.7 already supported closefrom(). Enable getaddrinfo(). NetBSD 8.0 adds support for accept4() and closefrom(). Enable getaddrinfo(). diff --git a/Makefile b/Makefile index 48c595511..0a3ac70e8 100644 --- a/Makefile +++ b/Makefile @@ -353,21 +353,20 @@ ifneq ($(shell echo __arm__/__aarch64__ | $(CC) -E -xc - | grep '^[^\#]'),__arm_ endif endif -# Solaris 8 and above +# Solaris 9 and above ifeq ($(TARGET),solaris) - # We also enable getaddrinfo() which works since solaris 8. set_target_defaults = $(call default_opts, \ USE_POLL USE_TPROXY USE_LIBCRYPT USE_CRYPT_H USE_GETADDRINFO USE_THREAD \ - USE_RT USE_OBSOLETE_LINKER USE_EVPORTS) + USE_RT USE_OBSOLETE_LINKER USE_EVPORTS USE_CLOSEFROM) TARGET_CFLAGS = -DFD_SETSIZE=65536 -D_REENTRANT -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ TARGET_LDFLAGS = -lnsl -lsocket endif -# FreeBSD 5 and above +# FreeBSD 10 and above ifeq ($(TARGET),freebsd) set_target_defaults = $(call default_opts, \ USE_POLL USE_TPROXY USE_LIBCRYPT USE_THREAD USE_CPU_AFFINITY USE_KQUEUE \ - USE_CLOSEFROM) + USE_ACCEPT4 USE_CLOSEFROM USE_GETADDRINFO) endif # Mac OS/X @@ -377,16 +376,18 @@ ifeq ($(TARGET),osx) EXPORT_SYMBOL = -export_dynamic endif -# OpenBSD 5.7 and above +# OpenBSD 6.3 and above ifeq ($(TARGET),openbsd) set_target_defaults = $(call default_opts, \ - USE_POLL USE_TPROXY USE_KQUEUE USE_ACCEPT4) + USE_POLL USE_TPROXY USE_THREAD USE_KQUEUE USE_ACCEPT4 USE_CLOSEFROM \ + USE_GETADDRINFO) endif -# NetBSD +# NetBSD 8 and above ifeq ($(TARGET),netbsd) set_target_defaults = $(call default_opts, \ - USE_POLL USE_TPROXY USE_KQUEUE) + USE_POLL USE_TPROXY USE_THREAD USE_KQUEUE USE_ACCEPT4 USE_CLOSEFROM \ + USE_GETADDRINFO) endif # AIX 5.1 only