diff options
author | Andreas Baumann <baumann@hyakutake-freebsd864.eurospider.ch> | 2010-05-21 11:51:05 +0200 |
---|---|---|
committer | Andreas Baumann <baumann@hyakutake-freebsd864.eurospider.ch> | 2010-05-21 11:51:05 +0200 |
commit | 0c7d6adf14a568a792ce65e359f9fb177499ad74 (patch) | |
tree | 6dbf1c2ce9e2f59a89cdadcb9c01846745f805f4 | |
parent | eca7b5dbd6929a75075372cc4be2c6b376d9cb17 (diff) | |
download | wolfbones-0c7d6adf14a568a792ce65e359f9fb177499ad74.tar.gz wolfbones-0c7d6adf14a568a792ce65e359f9fb177499ad74.tar.bz2 |
fixed compilation on FreeBSD 8.0 (64-bit)
-rw-r--r-- | include/wolf/network/network.h | 5 | ||||
-rw-r--r-- | include/wolf/port/sys.h | 24 | ||||
-rwxr-xr-x | makefiles/gmake/guess_env | 2 | ||||
-rw-r--r-- | src/port/sys_internal.h | 6 |
4 files changed, 36 insertions, 1 deletions
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 <sys/socket.h> /* for sockaddr_storage */ #include <netinet/in.h> /* for sockaddr_in */ #else +#if defined FREEBSD +#include <sys/socket.h> /* for sockaddr_storage */ +#include <netinet/in.h> /* 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 |