summaryrefslogtreecommitdiff
path: root/src/ipc/shmget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipc/shmget.c')
-rw-r--r--src/ipc/shmget.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ipc/shmget.c b/src/ipc/shmget.c
new file mode 100644
index 00000000..86e254af
--- /dev/null
+++ b/src/ipc/shmget.c
@@ -0,0 +1,12 @@
+#include <sys/shm.h>
+#include "syscall.h"
+#include "ipc.h"
+
+int shmget(key_t key, size_t size, int flag)
+{
+#ifdef __NR_shmget
+ return syscall3(__NR_shmget, key, size, flag);
+#else
+ return syscall4(__NR_ipc, IPCOP_shmget, key, size, flag);
+#endif
+}