1 #include <sys/shm.h> 2 #include <stdint.h> 3 #include "syscall.h" 4 #include "ipc.h" 5 shmget(key_t key,size_t size,int flag)6int shmget(key_t key, size_t size, int flag) 7 { 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 14 } 15