diff Core/SystemToolbox.cpp @ 2364:ae50eccd41b7

compilation succeeds on OpenBSD
author jodogne
date Mon, 21 Aug 2017 16:28:53 +0200
parents 9ccd7f926c5b
children 9e0eae8a5ea4
line wrap: on
line diff
--- a/Core/SystemToolbox.cpp	Mon Aug 21 15:04:20 2017 +0200
+++ b/Core/SystemToolbox.cpp	Mon Aug 21 16:28:53 2017 +0200
@@ -67,7 +67,7 @@
 
 extern "C"
 {
-#ifdef WIN32
+#if defined(_WIN32)
 #  include <rpc.h>
 #else
 #  include <uuid/uuid.h>
@@ -157,7 +157,7 @@
   {
 #if defined(_WIN32)
     ::Sleep(static_cast<DWORD>(microSeconds / static_cast<uint64_t>(1000)));
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__) || defined(__native_client__)
+#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__native_client__)
     usleep(microSeconds);
 #else
 #error Support your platform here
@@ -370,6 +370,13 @@
     return std::string(pathbuf);
   }
 
+#elif defined(__OpenBSD__)
+  static std::string GetPathToExecutableInternal()
+  {
+    // TODO
+    throw OrthancException(ErrorCode_NotImplemented);
+  }
+
 #else
 #error Support your platform here
 #endif