summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-01-08 17:37:05 -0500
committerRich Felker <dalias@aerifal.cx>2014-01-08 17:37:05 -0500
commit8e776e3ed40a4fb084e3d671d887825049c8f0cf (patch)
treefe1cd8e1d544801eea2b651475ca621c93b5bd4f /src
parent5f94205369a8b98ce2ce4ad2f7e2dba2da557846 (diff)
downloadmusl-8e776e3ed40a4fb084e3d671d887825049c8f0cf.tar.gz
musl-8e776e3ed40a4fb084e3d671d887825049c8f0cf.tar.bz2
musl-8e776e3ed40a4fb084e3d671d887825049c8f0cf.tar.xz
musl-8e776e3ed40a4fb084e3d671d887825049c8f0cf.zip
fix inadvertent use of struct in place of union for semun
Diffstat (limited to 'src')
-rw-r--r--src/ipc/semctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipc/semctl.c b/src/ipc/semctl.c
index 49927e2e..3d79f503 100644
--- a/src/ipc/semctl.c
+++ b/src/ipc/semctl.c
@@ -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);