freebsd-ports/graphics/wildmagic/files/patch-LibFoundation_System_Wm4System.cpp
Ed Schouten be087cc713 Don't depend on libcompat.
The code can be built to use gettimeofday() instead of ftime().

Approved by:	erwin (portmgr, implicit)
2010-03-09 18:42:11 +00:00

20 lines
576 B
C++

--- LibFoundation/System/Wm4System.cpp
+++ LibFoundation/System/Wm4System.cpp
@@ -21,7 +21,7 @@
#include <sys/stat.h>
// support for GetTime
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__)
#include <sys/time.h>
static timeval gs_kInitial;
static bool gs_bInitializedTime = false;
@@ -102,7 +102,7 @@
//----------------------------------------------------------------------------
double System::GetTime ()
{
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__)
if (!gs_bInitializedTime)
{
gs_bInitializedTime = true;