aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharlie Root <root@dec05eba.my.domain>2018-09-30 23:44:13 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commit0b09e97d0d6163b5a898f5642505ee12dd5ef30e (patch)
tree6464ce5279090cf99aa957aaca1faf68c50db095 /src
parent147188af8356d21fb9720308ef4912e1f3a22a15 (diff)
Add OpenBSD support
Diffstat (limited to 'src')
-rw-r--r--src/Conf.cpp10
-rw-r--r--src/Exec.cpp4
-rw-r--r--src/FileUtil.cpp5
3 files changed, 17 insertions, 2 deletions
diff --git a/src/Conf.cpp b/src/Conf.cpp
index 6645913..2fdef25 100644
--- a/src/Conf.cpp
+++ b/src/Conf.cpp
@@ -811,11 +811,19 @@ namespace sibs
{
platforms.push_back(PLATFORM_MACOS64);
}
+ else if (platform.equals("openbsd32"))
+ {
+ platforms.push_back(PLATFORM_OPENBSD32);
+ }
+ else if (platform.equals("openbsd64"))
+ {
+ platforms.push_back(PLATFORM_OPENBSD64);
+ }
else
{
string errMsg = "package.platforms contains invalid platform \"";
errMsg += string(platform.data, platform.size);
- errMsg += "\". Expected platform to be one of: any, linux32, linux64, win32, win64, macos32 or macos64";
+ errMsg += "\". Expected platform to be one of: any, linux32, linux64, win32, win64, macos32, macos64, openbsd32 or openbsd64";
throw ParserException(errMsg);
}
}
diff --git a/src/Exec.cpp b/src/Exec.cpp
index a183ed2..cfeb19d 100644
--- a/src/Exec.cpp
+++ b/src/Exec.cpp
@@ -1,6 +1,10 @@
#include "../include/Exec.hpp"
#include "../include/env.hpp"
+#if OS_FAMILY == OS_FAMILY_POSIX
+#include <sys/wait.h>
+#endif
+
using namespace std;
const int BUFSIZE = 1024;
diff --git a/src/FileUtil.cpp b/src/FileUtil.cpp
index e3d4c3c..f52dd1f 100644
--- a/src/FileUtil.cpp
+++ b/src/FileUtil.cpp
@@ -16,13 +16,16 @@
using namespace std;
+#if OS_TYPE == OS_TYPE_OPENBSD
+#define stat64 stat
+#endif
+
#if OS_FAMILY == OS_FAMILY_POSIX
static int makedir(const _tinydir_char_t *dir)
{
return mkdir(dir, S_IRWXU);
}
#elif OS_FAMILY == OS_FAMILY_WINDOWS
-
static int makedir(const _tinydir_char_t *dir)
{
return _wmkdir(dir);