projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix broken semctl on systems that don't use IPC_64 flag
[musl]
/
src
/
ipc
/
semctl.c
1
#include <sys/sem.h>
2
#include <stdarg.h>
3
#include "syscall.h"
4
#include "ipc.h"
5
6
#ifndef IPC_64
7
#define IPC_64 0
8
#endif
9
10
int semctl(int id, int num, int cmd, ...)
11
{
12
long arg;
13
va_list ap;
14
va_start(ap, cmd);
15
arg = va_arg(ap, long);
16
va_end(ap);
17
#ifdef SYS_semctl
18
return syscall(SYS_semctl, id, num, cmd | IPC_64, arg);
19
#else
20
return syscall(SYS_ipc, IPCOP_semctl, id, num, cmd | IPC_64, &arg);
21
#endif
22
}