]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include/pidfd-utils: remove hardcoded syscall fallback
authorKarel Zak <kzak@redhat.com>
Mon, 13 May 2024 09:43:57 +0000 (11:43 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 13 May 2024 09:43:57 +0000 (11:43 +0200)
Based on https://github.com/util-linux/util-linux/pull/3018

The syscall numbers should not be hardcoded in the header file. If we
really need them, there is UL_CHECK_SYSCALL() to define the numbers
for different architectures. I doubt it's really necessary. Just
update your kernel header files to get the latest kernel updates ...

Signed-off-by: Karel Zak <kzak@redhat.com>
include/pidfd-utils.h

index 0ee55f3bac08c7df08ac63fb0cf35e0822f18335..4f6f51b81d94ab2667c2b90fa828d2212d4fdcc2 100644 (file)
@@ -9,19 +9,6 @@
 # include <sys/syscall.h>
 # include <unistd.h>
 
-/*
- * If the kernel headers are too old to provide the syscall numbers, let's
- * define them ourselves. This can be helpful while cross-compiling.
- */
-#ifndef __NR_pidfd_send_signal
-#define __NR_pidfd_send_signal 424
-#define SYS_pidfd_send_signal __NR_pidfd_send_signal
-#endif
-#ifndef __NR_pidfd_open
-#define __NR_pidfd_open 434
-#define SYS_pidfd_open __NR_pidfd_open
-#endif
-
 # if defined(SYS_pidfd_send_signal) && defined(SYS_pidfd_open)
 #  ifdef HAVE_SYS_PIDFD_H
 #   include <sys/pidfd.h>