File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed 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
27
27
28
28
#include <sys/mman.h> // mmap
29
29
#include <unistd.h> // sysconf
30
-
30
+ #include <fcntl.h> // open, close, read, access
31
+
31
32
#if defined(__linux__ )
32
33
#include <features.h>
33
- #include <fcntl.h>
34
34
#if defined(__GLIBC__ )
35
35
#include <linux/mman.h> // linux mmap flags
36
36
#else
@@ -51,7 +51,7 @@ terms of the MIT license. A copy of the license can be found in the file
51
51
#include <sys/sysctl.h>
52
52
#endif
53
53
54
- #if !defined(__HAIKU__ ) && !defined(__APPLE__ ) && !defined(__CYGWIN__ )
54
+ #if !defined(__HAIKU__ ) && !defined(__APPLE__ ) && !defined(__CYGWIN__ ) && !defined( __OpenBSD__ )
55
55
#define MI_HAS_SYSCALL_H
56
56
#include <sys/syscall.h>
57
57
#endif
@@ -81,8 +81,6 @@ static int mi_prim_access(const char *fpath, int mode) {
81
81
82
82
#elif (!defined(__APPLE__ ) || MAC_OS_X_VERSION_MIN_REQUIRED < 1070 ) // avoid unused warnings on macOS
83
83
84
- #include <fcntl.h>
85
-
86
84
static int mi_prim_open (const char * fpath , int open_flags ) {
87
85
return open (fpath ,open_flags );
88
86
}
@@ -761,7 +759,6 @@ bool _mi_prim_random_buf(void* buf, size_t buf_len) {
761
759
762
760
#include <sys/types.h>
763
761
#include <sys/stat.h>
764
- #include <fcntl.h>
765
762
#include <errno.h>
766
763
767
764
bool _mi_prim_random_buf (void * buf , size_t buf_len ) {
You can’t perform that action at this time.
0 commit comments