]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/missing_syscall: fix syscall numbers for mips*
authorMichael Biebl <biebl@debian.org>
Wed, 7 Oct 2020 15:44:05 +0000 (17:44 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 8 Oct 2020 08:25:15 +0000 (10:25 +0200)
Thanks Christian Brauner @brauner
Fixes: #17261
src/basic/missing_syscall.h

index a2acdc6c95fa31c3c6d1c8d9524c030855548353..7427b632ac707a6242645bfd54f89d88fc0864ac 100644 (file)
@@ -628,8 +628,20 @@ static inline long missing_get_mempolicy(int *mode, unsigned long *nodemask,
 /* ======================================================================= */
 
 /* should be always defined, see kernel 39036cd2727395c3369b1051005da74059a85317 */
-#if defined(__alpha__)
+#if defined __alpha__
 #  define systemd_NR_pidfd_send_signal 534
+#elif defined _MIPS_SIM
+#  if _MIPS_SIM == _MIPS_SIM_ABI32     /* o32 */
+#    define systemd_NR_pidfd_send_signal (424 + 4000)
+#  endif
+#  if _MIPS_SIM == _MIPS_SIM_NABI32    /* n32 */
+#    define systemd_NR_pidfd_send_signal (424 + 6000)
+#  endif
+#  if _MIPS_SIM == _MIPS_SIM_ABI64     /* n64 */
+#    define systemd_NR_pidfd_send_signal (424 + 5000)
+#  endif
+#elif defined __ia64__
+#  define systemd_NR_pidfd_send_signal (424 + 1024)
 #else
 #  define systemd_NR_pidfd_send_signal 424
 #endif
@@ -660,8 +672,20 @@ static inline int missing_pidfd_send_signal(int fd, int sig, siginfo_t *info, un
 #endif
 
 /* should be always defined, see kernel 7615d9e1780e26e0178c93c55b73309a5dc093d7 */
-#if defined(__alpha__)
+#if defined __alpha__
 #  define systemd_NR_pidfd_open 544
+#elif defined _MIPS_SIM
+#  if _MIPS_SIM == _MIPS_SIM_ABI32     /* o32 */
+#    define systemd_NR_pidfd_open (434 + 4000)
+#  endif
+#  if _MIPS_SIM == _MIPS_SIM_NABI32    /* n32 */
+#    define systemd_NR_pidfd_open (434 + 6000)
+#  endif
+#  if _MIPS_SIM == _MIPS_SIM_ABI64     /* n64 */
+#    define systemd_NR_pidfd_open (434 + 5000)
+#  endif
+#elif defined __ia64__
+#  define systemd_NR_pidfd_open (434 + 1024)
 #else
 #  define systemd_NR_pidfd_open 434
 #endif