New: the man page seccomp(2) instructs the user to include <linux/signal.h> and it causes conflicts
https://bugzilla.kernel.org/show_bug.cgi?id=220723
Bug ID: 220723
Summary: the man page seccomp(2) instructs the user to include
<linux/signal.h> and it causes conflicts
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: man-pages
Assignee: [email protected]
Reporter: [email protected]
Regression: No
The man page seccomp(2) instructs the user to include these files:
#include <linux/seccomp.h> /* Definition of SECCOMP_* constants */
#include <linux/filter.h> /* Definition of struct sock_fprog */
#include <linux/audit.h> /* Definition of AUDIT_* constants */
#include <linux/signal.h> /* Definition of SIG* constants */
#include <sys/ptrace.h> /* Definition of PTRACE_* constants */
#include <sys/syscall.h> /* Definition of SYS_* constants */
#include <unistd.h>However, the include file <linux/signal.h> defines sigset_t and struct timeval and they clash with the glibc definition. <linux/signal.h> should be changed to <signal.h> in the man page.
How to reproduce: Try to compile this program:
#include <linux/seccomp.h>
#include <linux/filter.h>
#include <linux/audit.h>
#include <linux/signal.h>
#include <sys/ptrace.h>
#include <sys/syscall.h>
#include <unistd.h>
#include <stdlib.h>
int main(void)
{
return 0;
}You get these errors:
In file included from /usr/include/x86_64-linux-gnu/sys/select.h:33,
from /usr/include/x86_64-linux-gnu/sys/types.h:179,
from /usr/include/stdlib.h:395,
from seccomp.c:9:
/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h:7:20: error: conflicting
types for ‘sigset_t’; have ‘__sigset_t’
7 | typedef __sigset_t sigset_t;
| ^~~~~~~~In file included from /usr/include/linux/signal.h:5,
from seccomp.c:4:/usr/include/x86_64-linux-gnu/asm/signal.h:16:23: note: previous declaration of ‘sigset_t’ with type ‘sigset_t’ {aka ‘long unsigned int’}
16 | typedef unsigned long sigset_t;
| ^~~~~~~~In file included from /usr/include/x86_64-linux-gnu/sys/select.h:37:/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h:8:8: error:
redefinition of ‘struct timeval’
8 | struct timeval
| ^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/asm/signal.h:7:/usr/include/linux/time.h:16:8: note: originally defined here
16 | struct timeval {
| ^~~~~~~Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
Alejandro Colomar
maintainerHi Carlos,
Quoted 27 lines · On Wed, Oct 29, 2025 at 09:15:36PM +0000, [email protected] wrote:
https://bugzilla.kernel.org/show_bug.cgi?id=220723
Bug ID: 220723
Summary: the man page seccomp(2) instructs the user to include
<linux/signal.h> and it causes conflicts
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: man-pages
Assignee: [email protected]
Reporter: [email protected]
Regression: NoThe man page seccomp(2) instructs the user to include these files:
#include <linux/seccomp.h> /* Definition of SECCOMP_* constants */ #include <linux/filter.h> /* Definition of struct sock_fprog */ #include <linux/audit.h> /* Definition of AUDIT_* constants */ #include <linux/signal.h> /* Definition of SIG* constants */ #include <sys/ptrace.h> /* Definition of PTRACE_* constants */ #include <sys/syscall.h> /* Definition of SYS_* constants */ #include <unistd.h>
Quoted 3 lines
However, the include file <
linux/signal.h> definessigset_tand struct timeval and they clash with the glibc definition. <linux/signal.h> should be changed to <signal.h> in the man page.
Would you mind reviewing this?
Have a lovely day!
Alex
Quoted 48 lines
How to reproduce: Try to compile this program:
#include <
linux/seccomp.h>
#include <linux/filter.h>
#include <linux/audit.h>
#include <linux/signal.h>
#include <sys/ptrace.h>
#include <sys/syscall.h>
#include <unistd.h>#include <
stdlib.h>int main(void)
{ return 0; }You get these errors:
In file included from/usr/include/x86_64-linux-gnu/sys/select.h:33,from /usr/include/x86_64-linux-gnu/sys/types.h:179, from /usr/include/stdlib.h:395, from seccomp.c:9: /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h:7:20: error: conflicting types for ‘sigset_t’; have ‘__sigset_t’ 7 | typedef __sigset_t sigset_t; | ^~~~~~~~In file included from
/usr/include/linux/signal.h:5,
from seccomp.c:4:/usr/include/x86_64-linux-gnu/asm/signal.h:16:23: note: previous declaration of ‘sigset_t’ with type ‘sigset_t’ {aka ‘long unsigned int’}16 | typedef unsigned long sigset_t; | ^~~~~~~~In file included from
/usr/include/x86_64-linux-gnu/sys/select.h:37:/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h:8:8: error:
redefinition of ‘struct timeval’
8 | struct timeval
| ^~~~~~~
In file included from/usr/include/x86_64-linux-gnu/asm/signal.h:7:/usr/include/linux/time.h:16:8: note: originally defined here16 | struct timeval { | ^~~~~~~Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
Signature · 2 lines
<https://www.alejandro-colomar.es> Use port 80 (that is, <...:80/>).
[Bug 220723] the man page seccomp(2) instructs the user to include <linux/signal.h> and it causes conflicts
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=220723
--- Comment #1 from Alejandro Colomar ([email protected]) --- Hi Carlos,
Quoted 27 lines · On Wed, Oct 29, 2025 at 09:15:36PM +0000, [email protected] wrote:
https://bugzilla.kernel.org/show_bug.cgi?id=220723
Bug ID: 220723
Summary: the man page seccomp(2) instructs the user to include
<linux/signal.h> and it causes conflicts
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: man-pages
Assignee: [email protected]
Reporter: [email protected]
Regression: NoThe man page seccomp(2) instructs the user to include these files:
#include <linux/seccomp.h> /* Definition of SECCOMP_* constants */ #include <linux/filter.h> /* Definition of struct sock_fprog */ #include <linux/audit.h> /* Definition of AUDIT_* constants */ #include <linux/signal.h> /* Definition of SIG* constants */ #include <sys/ptrace.h> /* Definition of PTRACE_* constants */ #include <sys/syscall.h> /* Definition of SYS_* constants */ #include <unistd.h>
Quoted 5 lines
However, the include file <
linux/signal.h> definessigset_tand struct timeval
and they clash with the glibc definition. <linux/signal.h> should be changed to
<signal.h> in the man page.
Would you mind reviewing this?
Have a lovely day!
Alex
Quoted 49 lines
How to reproduce: Try to compile this program:
#include <
linux/seccomp.h>
#include <linux/filter.h>
#include <linux/audit.h>
#include <linux/signal.h>
#include <sys/ptrace.h>
#include <sys/syscall.h>
#include <unistd.h>#include <
stdlib.h>int main(void)
{ return 0; }You get these errors:
In file included from/usr/include/x86_64-linux-gnu/sys/select.h:33,from /usr/include/x86_64-linux-gnu/sys/types.h:179, from /usr/include/stdlib.h:395, from seccomp.c:9: /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h:7:20: error: conflicting types for ‘sigset_t’; have ‘__sigset_t’ 7 | typedef __sigset_t sigset_t; | ^~~~~~~~In file included from
/usr/include/linux/signal.h:5,
from seccomp.c:4:/usr/include/x86_64-linux-gnu/asm/signal.h:16:23: note: previous declaration of
‘sigset_t’ with type ‘sigset_t’ {aka ‘long unsigned int’}16 | typedef unsigned long sigset_t; | ^~~~~~~~In file included from
/usr/include/x86_64-linux-gnu/sys/select.h:37:/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h:8:8: error:
redefinition of ‘struct timeval’
8 | struct timeval
| ^~~~~~~
In file included from/usr/include/x86_64-linux-gnu/asm/signal.h:7:/usr/include/linux/time.h:16:8: note: originally defined here16 | struct timeval { | ^~~~~~~Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.