/
018-semop-shmdt-syscalls.patch
44 lines (40 loc) · 1.12 KB
/
018-semop-shmdt-syscalls.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From: Tias Guns <tias@ulyssis.org>
Date: Sun, 5 Aug 2012 15:39:30 +0200
Subject: [PATCH] android syscalls: shmdt shmat sembuf
Signed-off-by: Tias Guns <tias@ulyssis.org>
---
libbb/missing_syscalls.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c
index ac75829..474accb 100644
--- a/libbb/missing_syscalls.c
+++ b/libbb/missing_syscalls.c
@@ -55,6 +55,16 @@ int shmget(key_t key, size_t size, int shmflg)
return syscall(__NR_shmget, key, size, shmflg);
}
+int shmdt(const void *shmaddr)
+{
+ return syscall(__NR_shmdt, shmaddr);
+}
+
+void *shmat(int shmid, const void *shmaddr, int shmflg)
+{
+ return (void *)syscall(__NR_shmat, shmid, shmaddr, shmflg);
+}
+
int msgget(key_t key, int msgflg)
{
return syscall(__NR_msgget, key, msgflg);
@@ -77,4 +87,10 @@ int shmctl(int shmid, int cmd, struct shmid_ds *buf)
{
return syscall(__NR_shmctl, shmid, cmd, buf);
}
+
+struct sembuf; /* #include <linux/sem.h> */
+int semop(int semid, struct sembuf *sops, unsigned nsops)
+{
+ return syscall(__NR_semop, semid, sops, nsops);
+}
#endif
--
1.7.10.4