Skip to content

Commit b7d4437

Browse files
committed
avoid unused function warning on Solaris, PR #830 by @kulikjak
1 parent 5634527 commit b7d4437

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/prim/unix/prim.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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__) && !defined(__OpenBSD__)
54+
#if !defined(__HAIKU__) && !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__OpenBSD__) && !defined(__sun)
5555
#define MI_HAS_SYSCALL_H
5656
#include <sys/syscall.h>
5757
#endif
@@ -79,7 +79,7 @@ static int mi_prim_access(const char *fpath, int mode) {
7979
return syscall(SYS_access,fpath,mode);
8080
}
8181

82-
#elif (!defined(__APPLE__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1070) // avoid unused warnings on macOS
82+
#elif (!defined(__APPLE__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1070) && !defined(__sun) // avoid unused warnings on macOS and Solaris
8383

8484
static int mi_prim_open(const char* fpath, int open_flags) {
8585
return open(fpath,open_flags);

0 commit comments

Comments
 (0)