ipc: prefer SYS_ipc when it is defined
[musl.git] / src / ipc / shmget.c
blob7521b5fa3fcab7ed55260bcca5b7cbe9d6b77482
1 #include <sys/shm.h>
2 #include <stdint.h>
3 #include "syscall.h"
4 #include "ipc.h"
6 int shmget(key_t key, size_t size, int flag)
8 if (size > PTRDIFF_MAX) size = SIZE_MAX;
9 #ifndef SYS_ipc
10 return syscall(SYS_shmget, key, size, flag);
11 #else
12 return syscall(SYS_ipc, IPCOP_shmget, key, size, flag);
13 #endif