From b7d44378bb2840dcad4db5d921e552ddbc960361 Mon Sep 17 00:00:00 2001 From: Daan Date: Sat, 2 Mar 2024 15:32:35 -0800 Subject: [PATCH] avoid unused function warning on Solaris, PR #830 by @kulikjak --- src/prim/unix/prim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/prim/unix/prim.c b/src/prim/unix/prim.c index 5a1088e0..94ae7946 100644 --- a/src/prim/unix/prim.c +++ b/src/prim/unix/prim.c @@ -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__) && !defined(__OpenBSD__) +#if !defined(__HAIKU__) && !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__OpenBSD__) && !defined(__sun) #define MI_HAS_SYSCALL_H #include #endif @@ -79,7 +79,7 @@ static int mi_prim_access(const char *fpath, int mode) { return syscall(SYS_access,fpath,mode); } -#elif (!defined(__APPLE__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1070) // avoid unused warnings on macOS +#elif (!defined(__APPLE__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1070) && !defined(__sun) // avoid unused warnings on macOS and Solaris static int mi_prim_open(const char* fpath, int open_flags) { return open(fpath,open_flags);