Revision: 75711
          http://sourceforge.net/p/brlcad/code/75711
Author:   starseeker
Date:     2020-05-06 23:04:29 +0000 (Wed, 06 May 2020)
Log Message:
-----------
OpenBSD doesn't have sys/timeb.h

Modified Paths:
--------------
    brlcad/trunk/src/other/libspsr/CMakeLists.txt
    brlcad/trunk/src/other/libspsr/Src/MyTime.h

Modified: brlcad/trunk/src/other/libspsr/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/other/libspsr/CMakeLists.txt       2020-05-06 22:54:42 UTC 
(rev 75710)
+++ brlcad/trunk/src/other/libspsr/CMakeLists.txt       2020-05-06 23:04:29 UTC 
(rev 75711)
@@ -77,6 +77,12 @@
   add_definitions("-DSPSR_DLL_EXPORTS")
 endif(MSVC)
 
+include(CheckIncludeFiles)
+check_include_files("sys/timeb.h" HAVE_SYS_TIMEB)
+if (HAVE_SYS_TIMEB)
+  add_definitions(-DHAVE_SYS_TIMEB=1)
+endif (HAVE_SYS_TIMEB)
+
 IF(BUILD_SHARED_LIBS)
   add_library(SPSR SHARED ${libSPSR_srcs})
   install(TARGETS SPSR

Modified: brlcad/trunk/src/other/libspsr/Src/MyTime.h
===================================================================
--- brlcad/trunk/src/other/libspsr/Src/MyTime.h 2020-05-06 22:54:42 UTC (rev 
75710)
+++ brlcad/trunk/src/other/libspsr/Src/MyTime.h 2020-05-06 23:04:29 UTC (rev 
75711)
@@ -30,7 +30,9 @@
 #define MY_TIME_INCLUDED
 
 #include <string.h>
-#include <sys/timeb.h>
+#ifdef HAVE_SYS_TIMEB
+#  include <sys/timeb.h>
+#endif
 #ifndef WIN32
 #include <sys/time.h>
 #endif // WIN32

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to