mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-09 00:02:17 +03:00
fix inadvertent use of struct in place of union for semun
This commit is contained in:
parent
5f94205369
commit
8e776e3ed4
@ -3,7 +3,7 @@
|
||||
#include "syscall.h"
|
||||
#include "ipc.h"
|
||||
|
||||
struct semun {
|
||||
union semun {
|
||||
int val;
|
||||
struct semid_ds *buf;
|
||||
unsigned short *array;
|
||||
@ -11,10 +11,10 @@ struct semun {
|
||||
|
||||
int semctl(int id, int num, int cmd, ...)
|
||||
{
|
||||
struct semun arg;
|
||||
union semun arg;
|
||||
va_list ap;
|
||||
va_start(ap, cmd);
|
||||
arg = va_arg(ap, struct semun);
|
||||
arg = va_arg(ap, union semun);
|
||||
va_end(ap);
|
||||
#ifdef SYS_semctl
|
||||
return syscall(SYS_semctl, id, num, cmd | IPC_64, arg.buf);
|
||||
|
Loading…
Reference in New Issue
Block a user