From 639a6dc2a8a1c3c7bafa9de6e919dacd8286def0 Mon Sep 17 00:00:00 2001 From: Abimael Martell Date: Fri, 14 Feb 2014 13:21:14 -0800 Subject: [PATCH] fix compilation under FreeBSD --- mongoose.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mongoose.c b/mongoose.c index 863d25d8..85c1a49e 100644 --- a/mongoose.c +++ b/mongoose.c @@ -21,12 +21,15 @@ #define _INTEGRAL_MAX_BITS 64 // Enable _stati64() on Windows #define _CRT_SECURE_NO_WARNINGS // Disable deprecation warning in VS2005+ #undef WIN32_LEAN_AND_MEAN // Let windows.h always include winsock2.h -#define _XOPEN_SOURCE 600 // For flockfile() on Linux #define __STDC_FORMAT_MACROS // wants this for C++ #define __STDC_LIMIT_MACROS // C++ wants that for INT64_MAX #define _LARGEFILE_SOURCE // Enable fseeko() and ftello() functions #define _FILE_OFFSET_BITS 64 // Enable 64-bit file offsets +#ifndef __FreeBSD__ +#define _XOPEN_SOURCE 600 // For flockfile() on Linux, not needed in FreeBSD +#endif + #ifdef _MSC_VER #pragma warning (disable : 4127) // FD_SET() emits warning, disable it #pragma warning (disable : 4204) // missing c99 support