From 0c7d6adf14a568a792ce65e359f9fb177499ad74 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 21 May 2010 11:51:05 +0200 Subject: fixed compilation on FreeBSD 8.0 (64-bit) --- include/wolf/network/network.h | 5 +++++ include/wolf/port/sys.h | 24 ++++++++++++++++++++++++ makefiles/gmake/guess_env | 2 +- src/port/sys_internal.h | 6 ++++++ 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/include/wolf/network/network.h b/include/wolf/network/network.h index a16e65f..9b723b4 100644 --- a/include/wolf/network/network.h +++ b/include/wolf/network/network.h @@ -49,7 +49,12 @@ extern "C" { #include /* for sockaddr_storage */ #include /* for sockaddr_in */ #else +#if defined FREEBSD +#include /* for sockaddr_storage */ +#include /* for sockaddr_in */ +#else #error Check includes first! +#endif /* defined FREEBSD */ #endif /* defined NETBSD */ #endif /* defined OPENBSD */ #endif /* defined LINUX */ diff --git a/include/wolf/port/sys.h b/include/wolf/port/sys.h index d32bb76..456d62e 100644 --- a/include/wolf/port/sys.h +++ b/include/wolf/port/sys.h @@ -57,6 +57,29 @@ #endif /* defined LINUX */ #if defined FREEBSD +#if OS_MAJOR_VERSION == 8 +#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_SYSLOG_H +#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 == 0 */ +#else #if OS_MAJOR_VERSION == 7 #if OS_MINOR_VERSION == 0 #define _XOPEN_SOURCE 600 @@ -106,6 +129,7 @@ #error unknown platform #endif /* defined OS_MAJOR_VERSION == 6 */ #endif /* defined OS_MAJOR_VERSION == 7 */ +#endif /* defined OS_MAJOR_VERSION == 8 */ #endif /* defined FREEBSD */ #if defined OPENBSD diff --git a/makefiles/gmake/guess_env b/makefiles/gmake/guess_env index 2e4f3de..0ed5601 100755 --- a/makefiles/gmake/guess_env +++ b/makefiles/gmake/guess_env @@ -67,7 +67,7 @@ esac case "$UNAME_MACHINE" in i*86*) ARCH=x86 ;; - x86_64) ARCH=x86_64 + x86_64|amd64) ARCH=x86_64 ;; sun4u) ARCH=sun4u ;; diff --git a/src/port/sys_internal.h b/src/port/sys_internal.h index 1eaaa4e..1a83785 100644 --- a/src/port/sys_internal.h +++ b/src/port/sys_internal.h @@ -41,6 +41,11 @@ #endif /* defined LINUX */ #if defined FREEBSD +#if OS_MAJOR_VERSION == 8 +#define HAVE_LOCK_F +#define HAVE_LOCALTIME_R +#define HAVE_DLFCN +#else #if OS_MAJOR_VERSION == 7 #if OS_MINOR_VERSION == 0 #define HAVE_LOCK_F @@ -60,6 +65,7 @@ #error unknown platform #endif /* defined OS_MAJOR_VERSION == 6 */ #endif /* defined OS_MAJOR_VERSION == 7 */ +#endif /* defined OS_MAJOR_VERSION == 8 */ #endif /* defined FREEBSD */ #if defined OPENBSD -- cgit v1.2.3-54-g00ecf