diff options
-rw-r--r-- | include/wolf/network/network.h | 9 | ||||
-rw-r--r-- | include/wolf/port/sys.h | 29 | ||||
-rw-r--r-- | src/port/sys_internal.h | 11 |
3 files changed, 46 insertions, 3 deletions
diff --git a/include/wolf/network/network.h b/include/wolf/network/network.h index bfcaa3f..a16e65f 100644 --- a/include/wolf/network/network.h +++ b/include/wolf/network/network.h @@ -43,11 +43,16 @@ extern "C" { #else #if defined OPENBSD #include <sys/socket.h> /* for sockaddr_storage */ +//#include <netinet/in.h> /* for sockaddr_in */ +#else +#if defined NETBSD +#include <sys/socket.h> /* for sockaddr_storage */ #include <netinet/in.h> /* for sockaddr_in */ #else #error Check includes first! -#endif -#endif +#endif /* defined NETBSD */ +#endif /* defined OPENBSD */ +#endif /* defined LINUX */ /** * helper union to avoid anti-aliasing warnings in old network functions like getpeername, diff --git a/include/wolf/port/sys.h b/include/wolf/port/sys.h index 7a33c81..eccd98a 100644 --- a/include/wolf/port/sys.h +++ b/include/wolf/port/sys.h @@ -137,6 +137,34 @@ #endif /* defined OPENBSD */ #if defined NETBSD +#if OS_MAJOR_VERSION == 5 +#if OS_MINOR_VERSION == 0 +#define _XOPEN_SOURCE 600 +#define HAVE_STDBOOL_H +#define HAVE_STDINT_H +#define HAVE_VSNPRINTF +#define HAVE_SNPRINTF +#define HAVE_VASPRINTF +#define HAVE_ASPRINTF +#define HAVE_STRDUP +#define HAVE_STRERROR_R +#define HAVE_STRCASECMP +#define HAVE_STRNCASECMP +#define HAVE_STRINGS_H +#define HAVE_SYSLOG_H +#define GETTEXT_NEEDS_FORMAT_ARG +#define HAVE_STRLCPY +#define MUST_DEFINE_STRLCPY_PROTOTYPE +#define HAVE_STRLCAT +#define MUST_DEFINE_STRLCAT_PROTOTYPE +#define HAVE_GETADDRINFO +#define HAVE_IPV6 +#define HAVE_PTHREADS +#else + #error unknown platform +#endif /* defined OS_MINOR_VERSION == 2 */ +#else /* defined OS_MAJOR_VERSION == 4 */ + #if OS_MAJOR_VERSION == 4 #if OS_MINOR_VERSION == 0 #define _XOPEN_SOURCE 600 @@ -166,6 +194,7 @@ #else #error unknown platform #endif /* defined OS_MAJOR_VERSION == 4 */ +#endif /* defined OS_MAJOR_VERSION == 5 */ #endif /* defined NETBSD */ #if defined SUNOS diff --git a/src/port/sys_internal.h b/src/port/sys_internal.h index 4858c63..0bab5fb 100644 --- a/src/port/sys_internal.h +++ b/src/port/sys_internal.h @@ -75,16 +75,25 @@ #endif /* defined OPENBSD */ #if defined NETBSD -#if OS_MAJOR_VERSION == 4 +#if OS_MAJOR_VERSION == 5 #if OS_MINOR_VERSION == 0 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #else #error unknown platform #endif /* defined OS_MINOR_VERSION == 2 */ +#else /* define OS_MAJOR_VERSION == 5 */ +#if OS_MAJOR_VERSION == 4 +#if OS_MINOR_VERSION == 0 +#define HAVE_LOCK_F +#define HAVE_LOCALTIME_R +#else + #error unknown platform +#endif /* defined OS_MINOR_VERSION == 0 */ #else #error unknown platform #endif /* defined OS_MAJOR_VERSION == 4 */ +#endif /* defined OS_MAJOR_VERSION == 5 */ #endif /* defined NETBSD */ #if defined SUNOS |