diff --git a/src/prim/unix/prim.c b/src/prim/unix/prim.c index 91fa6508..5a1088e0 100644 --- a/src/prim/unix/prim.c +++ b/src/prim/unix/prim.c @@ -27,10 +27,10 @@ terms of the MIT license. A copy of the license can be found in the file #include // mmap #include // sysconf - +#include // open, close, read, access + #if defined(__linux__) #include - #include #if defined(__GLIBC__) #include // linux mmap flags #else @@ -51,7 +51,7 @@ terms of the MIT license. A copy of the license can be found in the file #include #endif -#if !defined(__HAIKU__) && !defined(__APPLE__) && !defined(__CYGWIN__) +#if !defined(__HAIKU__) && !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__OpenBSD__) #define MI_HAS_SYSCALL_H #include #endif @@ -81,8 +81,6 @@ static int mi_prim_access(const char *fpath, int mode) { #elif (!defined(__APPLE__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1070) // avoid unused warnings on macOS -#include - static int mi_prim_open(const char* fpath, int open_flags) { return open(fpath,open_flags); } @@ -761,7 +759,6 @@ bool _mi_prim_random_buf(void* buf, size_t buf_len) { #include #include -#include #include bool _mi_prim_random_buf(void* buf, size_t buf_len) {