ENDIF()
INCLUDE(CheckIncludeFiles)
+INCLUDE(CheckFunctionExists)
CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H)
CHECK_INCLUDE_FILES(errno.h HAVE_ERRNO_H)
CHECK_INCLUDE_FILES(usbhid.h HAVE_USBHID_H)
+CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
# The generated config.h is placed in the project's build directory, just to
# ensure that all CMake-generated files are kept away from the main source tree.
#cmakedefine HAVE_FCNTL_H
#cmakedefine HAVE_ERRNO_H
#cmakedefine HAVE_USBHID_H
+#cmakedefine HAVE_GETTIMEOFDAY
\ No newline at end of file
unsigned long fgPlatformSystemTime ( void )
{
-#if TARGET_HOST_SOLARIS || HAVE_GETTIMEOFDAY
+#ifdef HAVE_GETTIMEOFDAY
struct timeval now;
gettimeofday( &now, NULL );
return now.tv_usec/1000 + now.tv_sec*1000;