consistency: change all remaining syscalls to use SYS_ rather than __NR_ prefix
diff --git a/src/ipc/msgctl.c b/src/ipc/msgctl.c
index 7c84291..d50e395 100644
--- a/src/ipc/msgctl.c
+++ b/src/ipc/msgctl.c
@@ -4,7 +4,7 @@
 
 int msgctl(int q, int cmd, struct msqid_ds *buf)
 {
-#ifdef __NR_msgctl
+#ifdef SYS_msgctl
 	return syscall(SYS_msgctl, q, cmd, buf);
 #else
 	return syscall(SYS_ipc, IPCOP_msgctl, q, cmd, buf);
diff --git a/src/ipc/msgget.c b/src/ipc/msgget.c
index 9d79fe7..9dfbc4e 100644
--- a/src/ipc/msgget.c
+++ b/src/ipc/msgget.c
@@ -4,7 +4,7 @@
 
 int msgget(key_t k, int flag)
 {
-#ifdef __NR_msgget
+#ifdef SYS_msgget
 	return syscall(SYS_msgget, k, flag);
 #else
 	return syscall(SYS_ipc, IPCOP_msgget, k, flag);
diff --git a/src/ipc/msgrcv.c b/src/ipc/msgrcv.c
index ee07176..13c282e 100644
--- a/src/ipc/msgrcv.c
+++ b/src/ipc/msgrcv.c
@@ -7,7 +7,7 @@
 {
 	ssize_t r;
 	CANCELPT_BEGIN;
-#ifdef __NR_msgrcv
+#ifdef SYS_msgrcv
 	r = syscall(SYS_msgrcv, q, m, len, type, flag);
 #else
 	r = syscall(SYS_ipc, IPCOP_msgrcv, q, len, flag, ((long[]){ (long)m, type }));
diff --git a/src/ipc/msgsnd.c b/src/ipc/msgsnd.c
index 26057f2..1e0b2fa 100644
--- a/src/ipc/msgsnd.c
+++ b/src/ipc/msgsnd.c
@@ -7,7 +7,7 @@
 {
 	ssize_t r;
 	CANCELPT_BEGIN;
-#ifdef __NR_msgsnd
+#ifdef SYS_msgsnd
 	r = syscall(SYS_msgsnd, q, m, len, flag);
 #else
 	r = syscall(SYS_ipc, IPCOP_msgsnd, q, len, flag, m);
diff --git a/src/ipc/semctl.c b/src/ipc/semctl.c
index 392a4aa..df05ec7 100644
--- a/src/ipc/semctl.c
+++ b/src/ipc/semctl.c
@@ -10,7 +10,7 @@
 	va_start(ap, cmd);
 	arg = va_arg(ap, long);
 	va_end(ap);
-#ifdef __NR_semctl
+#ifdef SYS_semctl
 	return syscall(SYS_semctl, id, num, cmd, arg);
 #else
 	return syscall(SYS_ipc, IPCOP_semctl, id, num, cmd | 0x100, &arg);
diff --git a/src/ipc/semget.c b/src/ipc/semget.c
index 530c75f..5f110e3 100644
--- a/src/ipc/semget.c
+++ b/src/ipc/semget.c
@@ -4,7 +4,7 @@
 
 int semget(key_t key, int n, int fl)
 {
-#ifdef __NR_semget
+#ifdef SYS_semget
 	return syscall(SYS_semget, key, n, fl);
 #else
 	return syscall(SYS_ipc, IPCOP_semget, key, n, fl);
diff --git a/src/ipc/semop.c b/src/ipc/semop.c
index 1545340..8046e43 100644
--- a/src/ipc/semop.c
+++ b/src/ipc/semop.c
@@ -4,7 +4,7 @@
 
 int semop(int id, struct sembuf *buf, size_t n)
 {
-#ifdef __NR_semop
+#ifdef SYS_semop
 	return syscall(SYS_semop, id, buf, n);
 #else
 	return syscall(SYS_ipc, IPCOP_semop, id, n, 0, buf);
diff --git a/src/ipc/shmat.c b/src/ipc/shmat.c
index c6ee400..38db92f 100644
--- a/src/ipc/shmat.c
+++ b/src/ipc/shmat.c
@@ -2,7 +2,7 @@
 #include "syscall.h"
 #include "ipc.h"
 
-#ifdef __NR_shmat
+#ifdef SYS_shmat
 void *shmat(int id, const void *addr, int flag)
 {
 	return (void *)syscall(SYS_shmat, id, addr, flag);
diff --git a/src/ipc/shmctl.c b/src/ipc/shmctl.c
index 3645fe2..b2bdfa1 100644
--- a/src/ipc/shmctl.c
+++ b/src/ipc/shmctl.c
@@ -4,7 +4,7 @@
 
 int shmctl(int id, int cmd, struct shmid_ds *buf)
 {
-#ifdef __NR_shmctl
+#ifdef SYS_shmctl
 	return syscall(SYS_shmctl, id, cmd, buf);
 #else
 	return syscall(SYS_ipc, IPCOP_shmctl, id, cmd | IPC_MODERN, buf);
diff --git a/src/ipc/shmdt.c b/src/ipc/shmdt.c
index b4c9e69..2e198b3 100644
--- a/src/ipc/shmdt.c
+++ b/src/ipc/shmdt.c
@@ -4,7 +4,7 @@
 
 int shmdt(const void *addr)
 {
-#ifdef __NR_shmdt
+#ifdef SYS_shmdt
 	return syscall(SYS_shmdt, addr);
 #else
 	return syscall(SYS_ipc, IPCOP_shmdt, addr);
diff --git a/src/ipc/shmget.c b/src/ipc/shmget.c
index 9b14f8d..61fb11d 100644
--- a/src/ipc/shmget.c
+++ b/src/ipc/shmget.c
@@ -4,7 +4,7 @@
 
 int shmget(key_t key, size_t size, int flag)
 {
-#ifdef __NR_shmget
+#ifdef SYS_shmget
 	return syscall(SYS_shmget, key, size, flag);
 #else
 	return syscall(SYS_ipc, IPCOP_shmget, key, size, flag);