https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224300

            Bug ID: 224300
           Summary: sys/sem.h improperly declares union semun
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: [email protected]
          Reporter: [email protected]

sys/sem.h declares union semun imporpertly.  According to the POSIX manpage, it
should be declared by the application if required:

> The semctl() function provides a variety of semaphore control operations as
> specified by cmd. The fourth argument is optional and depends upon the
> operation requested. If required, it is of type union semun, which the
> application shall explicitly declare:
> 
> union semun {
>     int val;
>     struct semid_ds *buf;
>     unsigned short  *array;
> } arg;

union semun is used in the kernel so the declaration should be moved under an
#ifdef _KERNEL and an exprun should be performed.  It looks like configure
scripts commonly handle this case so it may change code, but shouldn't break
much.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to