public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [Bug 220723] New: the man page seccomp(2) instructs the user to include <linux/signal.h> and it causes conflicts
@ 2025-10-29 21:15 bugzilla-daemon
  2025-11-09 12:22 ` Alejandro Colomar
  2025-11-09 12:22 ` [Bug 220723] " bugzilla-daemon
  0 siblings, 2 replies; 3+ messages in thread
From: bugzilla-daemon @ 2025-10-29 21:15 UTC (permalink / raw)
  To: linux-man

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: documentation_man-pages@kernel-bugs.osdl.org
          Reporter: mpatocka@redhat.com
        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 {
      |        ^~~~~~~

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-09 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29 21:15 [Bug 220723] New: the man page seccomp(2) instructs the user to include <linux/signal.h> and it causes conflicts bugzilla-daemon
2025-11-09 12:22 ` Alejandro Colomar
2025-11-09 12:22 ` [Bug 220723] " bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox