From 5273cf62c5fa935f974685ebf3871699e8045f80 Mon Sep 17 00:00:00 2001 From: Greg Steuck Date: Thu, 2 Nov 2023 22:46:52 -0700 Subject: [PATCH] Use proper libc stubs instead of direct syscalls on OpenBSD Make #include fcntl.h unconditional to avoid implicit definitions. --- src/prim/unix/prim.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/prim/unix/prim.c b/src/prim/unix/prim.c index 314281fe..76fbc2c0 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 #if defined(__linux__) #include - #include #if defined(__GLIBC__) #include // linux mmap flags #else @@ -50,7 +50,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 @@ -762,7 +762,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) {