diff Core/Toolbox.cpp @ 890:816dccaeb7cf

Support of kFreeBSD
author jodogne
date Mon, 16 Jun 2014 15:39:16 +0200
parents a811bdf8b8eb
children 517e28b420af 703bef350e89
line wrap: on
line diff
--- a/Core/Toolbox.cpp	Sat Jun 14 15:50:02 2014 +0200
+++ b/Core/Toolbox.cpp	Mon Jun 16 15:39:16 2014 +0200
@@ -54,7 +54,7 @@
 #include <limits.h>      /* PATH_MAX */
 #endif
 
-#if defined(__linux)
+#if defined(__linux) || defined(__FreeBSD_kernel__)
 #include <limits.h>      /* PATH_MAX */
 #include <signal.h>
 #include <unistd.h>
@@ -162,7 +162,7 @@
   {
 #if defined(_WIN32)
     ::Sleep(static_cast<DWORD>(microSeconds / static_cast<uint64_t>(1000)));
-#elif defined(__linux)
+#elif defined(__linux) || defined(__FreeBSD_kernel__)
     usleep(microSeconds);
 #else
 #error Support your platform here
@@ -515,7 +515,7 @@
     return std::string(&buffer[0]);
   }
 
-#elif defined(__linux)
+#elif defined(__linux) || defined(__FreeBSD_kernel__)
   std::string Toolbox::GetPathToExecutable()
   {
     std::vector<char> buffer(PATH_MAX + 1);