diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-09-22 08:02:42 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-09-22 08:02:42 -0400 |
commit | fce46bf980a82bad9e6c083066cae4813649ebf5 (patch) | |
tree | 076e0e1317bda0fd4b29d43183b3c2465bb7d903 /src/ipc | |
parent | 0b3e2257fa9f4c4773f8aec1bdbccbc46a4d9477 (diff) | |
download | musl-fce46bf980a82bad9e6c083066cae4813649ebf5.tar.gz musl-fce46bf980a82bad9e6c083066cae4813649ebf5.tar.bz2 musl-fce46bf980a82bad9e6c083066cae4813649ebf5.tar.xz musl-fce46bf980a82bad9e6c083066cae4813649ebf5.zip |
fix broken semctl on systems that don't use IPC_64 flag
not tested on mips and arm; they may still be broken. x86_64 should be
ok now.
Diffstat (limited to 'src/ipc')
-rw-r--r-- | src/ipc/semctl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ipc/semctl.c b/src/ipc/semctl.c index a210e20b..9de5b1d7 100644 --- a/src/ipc/semctl.c +++ b/src/ipc/semctl.c @@ -3,6 +3,10 @@ #include "syscall.h" #include "ipc.h" +#ifndef IPC_64 +#define IPC_64 0 +#endif + int semctl(int id, int num, int cmd, ...) { long arg; @@ -11,8 +15,8 @@ int semctl(int id, int num, int cmd, ...) arg = va_arg(ap, long); va_end(ap); #ifdef SYS_semctl - return syscall(SYS_semctl, id, num, cmd | 0x100, arg); + return syscall(SYS_semctl, id, num, cmd | IPC_64, arg); #else - return syscall(SYS_ipc, IPCOP_semctl, id, num, cmd | 0x100, &arg); + return syscall(SYS_ipc, IPCOP_semctl, id, num, cmd | IPC_64, &arg); #endif } |