POSIX says this in the documentation for the semctl function:
type union semun, which the application shall explicitly declare:
union semun { int val; struct semid_ds *buf; unsigned short *array; } arg;
Why did they decide that the application has to declare that union, instead of just putting it in sys/sem.h? The glibc FAQ mentions that this is the case too, but is similarly unenlightening as to why:
The sys/sem.h file lacks the definition of `union semun'.
Nope. This union has to be provided by the user program. Former glibc versions defined this but it was an error since it does not make much sense when thinking about it. The standards describing the System V IPC functions define it this way and therefore programs must be adopted.