File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ terms of the MIT license. A copy of the license can be found in the file
2727
2828#include <sys/mman.h> // mmap
2929#include <unistd.h> // sysconf
30-
30+ #include <fcntl.h> // open, close, read, access
31+
3132#if defined(__linux__ )
3233 #include <features.h>
33- #include <fcntl.h>
3434 #if defined(__GLIBC__ )
3535 #include <linux/mman.h> // linux mmap flags
3636 #else
@@ -51,7 +51,7 @@ terms of the MIT license. A copy of the license can be found in the file
5151 #include <sys/sysctl.h>
5252#endif
5353
54- #if !defined(__HAIKU__ ) && !defined(__APPLE__ ) && !defined(__CYGWIN__ )
54+ #if !defined(__HAIKU__ ) && !defined(__APPLE__ ) && !defined(__CYGWIN__ ) && !defined( __OpenBSD__ )
5555 #define MI_HAS_SYSCALL_H
5656 #include <sys/syscall.h>
5757#endif
@@ -81,8 +81,6 @@ static int mi_prim_access(const char *fpath, int mode) {
8181
8282#elif (!defined(__APPLE__ ) || MAC_OS_X_VERSION_MIN_REQUIRED < 1070 ) // avoid unused warnings on macOS
8383
84- #include <fcntl.h>
85-
8684static int mi_prim_open (const char * fpath , int open_flags ) {
8785 return open (fpath ,open_flags );
8886}
@@ -761,7 +759,6 @@ bool _mi_prim_random_buf(void* buf, size_t buf_len) {
761759
762760#include <sys/types.h>
763761#include <sys/stat.h>
764- #include <fcntl.h>
765762#include <errno.h>
766763
767764bool _mi_prim_random_buf (void * buf , size_t buf_len ) {
You can’t perform that action at this time.
0 commit comments