| Server IP : 82.208.35.60 / Your IP : 216.73.216.168 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/science/opensim-core/files/ |
Upload File : |
--- OpenSim/Common/IO.cpp.orig 2018-11-15 09:02:08 UTC
+++ OpenSim/Common/IO.cpp
@@ -33,7 +33,7 @@
#include <climits>
#include "IO.h"
-#if defined(__linux__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
#include <sys/stat.h>
#include <sys/types.h>
#elif defined(_MSC_VER)
@@ -476,7 +476,7 @@ int IO::
makeDir(const string &aDirName)
{
-#if defined __linux__ || defined __APPLE__
+#if defined __linux__ || defined __APPLE__ || defined __FreeBSD__
return mkdir(aDirName.c_str(),S_IRWXU);
#else
return _mkdir(aDirName.c_str());
@@ -491,7 +491,7 @@ int IO::
chDir(const string &aDirName)
{
-#if defined __linux__ || defined __APPLE__
+#if defined __linux__ || defined __APPLE__ || defined __FreeBSD__
return chdir(aDirName.c_str());
#else
return _chdir(aDirName.c_str());
@@ -507,7 +507,7 @@ string IO::
getCwd()
{
char buffer[PATH_MAX];
-#if defined __linux__ || defined __APPLE__
+#if defined __linux__ || defined __APPLE__ || defined __FreeBSD__
auto ptr = getcwd(buffer, PATH_MAX); (void)ptr;
#else
_getcwd(buffer, PATH_MAX);