From 52719f926bbbd2fd10239447b0140a0128b6ef5d Mon Sep 17 00:00:00 2001 From: Nigko Yerden Date: Thu, 8 Oct 2026 19:26:25 +0500 Subject: [PATCH] Fix build on the GNU Hurd. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SYS_* system call numbers are not defined on the Hurd system. Three of them, SYS_mbind, SYS_set_mempolicy, and SYS_gettid, are used in "common_linux.h". The first two are about setting NUMA (Non‐Uniform Memory Access) policy. NUMA is not supported by the Hurd for now. The third one refers to the Linux specific model of threads. Therefore it is safe to simply disable these syscalls on the GNU Hurd. --- common_linux.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common_linux.h b/common_linux.h index 83111d2069..f22b64aca3 100644 --- a/common_linux.h +++ b/common_linux.h @@ -70,7 +70,8 @@ extern long int syscall (long int __sysno, ...); static inline int my_mbind(void *addr, unsigned long len, int mode, unsigned long *nodemask, unsigned long maxnode, unsigned flags) { -#if defined (__LSB_VERSION__) || defined(ARCH_ZARCH) || defined(__PIZLONATOR_WAS_HERE__) +#if defined (__LSB_VERSION__) || defined(ARCH_ZARCH) || defined(__PIZLONATOR_WAS_HERE__) \ + || defined(__gnu_hurd__) // So far, LSB (Linux Standard Base) don't support syscall(). // https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3482 return 0; @@ -82,7 +83,7 @@ static inline int my_mbind(void *addr, unsigned long len, int mode, } static inline int my_set_mempolicy(int mode, const unsigned long *addr, unsigned long flag) { -#if defined (__LSB_VERSION__) || defined(ARCH_ZARCH) +#if defined (__LSB_VERSION__) || defined(ARCH_ZARCH) || defined(__gnu_hurd__) // So far, LSB (Linux Standard Base) don't support syscall(). // https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3482 return 0;