From Ganael Laplanche.
#include <sys/socket.h>
#endif
+// FlightGear modification: for FreeBSD compat
+#include <sys/time.h> // for struct timeval
+
#ifdef BUILDING_DLL
# if defined(WIN32) || defined(_WIN32_WCE)
# ifdef _MSC_VER
#include <arpa/inet.h>
#include <time.h>
-#if !defined(MACOSX) && !defined(__OpenBSD__)
+// FlightGear: Modified to include FreeBSD
+#if !defined(MACOSX) && !defined(__OpenBSD__) && !defined(__FreeBSD__)
#include <malloc.h>
#if !defined(SOLARIS)
#include <error.h>
#include <map>
#include <vector>
#include <string>
+#include <ctime> // for time_t
// forward decls
class FGAirport;
#include <simgear/compiler.h>
#include <simgear/sg_inlines.h>
-#include <stdio.h> // size_t
+#include <cstdlib> // size_t
#include <string>
#include <simgear/constants.h>