-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/basic/missing_syscall: change #ifndef to #if ! (defined && > 0)
The #ifndef check used to work for missing __NR_* syscall defines, but unfortunately libseccomp now redefines missing syscall number to negative numbers, in their public header file, e.g.: https://github.com/seccomp/libseccomp/blob/master/include/seccomp.h.in#L801 When systemd is built, since it includes <seccomp.h>, it pulls in the incorrect negative value for any __NR_* syscall define that's included in the seccomp.h header (for those syscalls that the kernel headers don't yet define, e.g. when built with older/stable-distro kernels). This leads to bugs like: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1821625 This changes the check so that it can override the negative number that libseccomp defines, instead of trying to use the negative syscall number. To avoid gcc warnings (which are failures with meson --werror), this checks without generating a redefinition gcc warning. I have no idea why libseccomp decided to define missing syscalls to negative numbers inside their *public* header file, causing problems like this.
- Loading branch information
Showing
1 changed file
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters