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