]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111906: Fix warnings during mimalloc build on FreeBSD (#111907)
authorFurkan Onder <furkanonder@protonmail.com>
Tue, 14 Nov 2023 16:07:46 +0000 (19:07 +0300)
committerGitHub <noreply@github.com>
Tue, 14 Nov 2023 16:07:46 +0000 (17:07 +0100)
Fix `unused function` warnings during mimalloc build on FreeBSD.

Objects/mimalloc/prim/unix/prim.c

index 790d7418eaba03e017a0781b8f34509f06d41a2a..cffbb2d0b4d7b29de0024c582f84fb9930ecf782 100644 (file)
@@ -50,7 +50,7 @@ terms of the MIT license. A copy of the license can be found in the file
   #include <sys/sysctl.h>
 #endif
 
-#if !defined(__HAIKU__) && !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(_AIX)
+#if !defined(__HAIKU__) && !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(_AIX) && !defined(__FreeBSD__)
   #define MI_HAS_SYSCALL_H
   #include <sys/syscall.h>
 #endif
@@ -76,7 +76,7 @@ static int mi_prim_access(const char *fpath, int mode) {
   return syscall(SYS_access,fpath,mode);
 }
 
-#elif !defined(__APPLE__) && !defined(_AIX)  // avoid unused warnings
+#elif !defined(__APPLE__) && !defined(_AIX) && !defined(__FreeBSD__) // avoid unused warnings
 
 static int mi_prim_open(const char* fpath, int open_flags) {
   return open(fpath,open_flags);