From 975d888d65345cbab0694d48729af3ae527c8a9b Mon Sep 17 00:00:00 2001 From: crs Date: Sat, 1 May 2004 11:01:40 +0000 Subject: [PATCH] Fixes for FreeBSD. --- lib/arch/CArchNetworkBSD.cpp | 3 --- lib/arch/CArchNetworkBSD.h | 3 +++ lib/common/common.h | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/arch/CArchNetworkBSD.cpp b/lib/arch/CArchNetworkBSD.cpp index 27be0fea..d7ecb33a 100644 --- a/lib/arch/CArchNetworkBSD.cpp +++ b/lib/arch/CArchNetworkBSD.cpp @@ -16,9 +16,6 @@ #include "CArch.h" #include "CArchMultithreadPosix.h" #include "XArchUnix.h" -#if HAVE_SYS_TYPES_H -# include -#endif #if HAVE_UNISTD_H # include #endif diff --git a/lib/arch/CArchNetworkBSD.h b/lib/arch/CArchNetworkBSD.h index b656e14a..671e653e 100644 --- a/lib/arch/CArchNetworkBSD.h +++ b/lib/arch/CArchNetworkBSD.h @@ -17,6 +17,9 @@ #include "IArchNetwork.h" #include "IArchMultithread.h" +#if HAVE_SYS_TYPES_H +# include +#endif #if HAVE_SYS_SOCKET_H # include #endif diff --git a/lib/common/common.h b/lib/common/common.h index 96910efc..4c0be0ae 100644 --- a/lib/common/common.h +++ b/lib/common/common.h @@ -67,6 +67,12 @@ #define __FP__ #endif +// Need this on FreeBSD to get nanosleep. We can't define this on, say, +// Linux because that unconditionally defines it. +#if defined(__FreeBSD__) +#define _POSIX_VERSION 199506L +#endif + // define NULL #ifndef NULL #define NULL 0