about summary refs log tree commit diff
path: root/src/ipc/shmctl.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2019-05-09 22:49:28 +0000
committerRich Felker <dalias@aerifal.cx>2019-07-01 14:17:59 -0400
commit4acfc287d859bc643c9f9fa63d82e8c90b984d7c (patch)
tree21ca5531740752becb7a0927339c8c995db45c0a /src/ipc/shmctl.c
parentb574de5bf3baeb9f1a54b4c05660830e36e5fca2 (diff)
downloadmusl-4acfc287d859bc643c9f9fa63d82e8c90b984d7c.tar.gz
musl-4acfc287d859bc643c9f9fa63d82e8c90b984d7c.tar.xz
musl-4acfc287d859bc643c9f9fa63d82e8c90b984d7c.zip
ipc: prefer SYS_ipc when it is defined
Linux v5.1 introduced ipc syscalls on targets where previously only
SYS_ipc was available, change the logic such that the ipc code keeps
using SYS_ipc which works backward compatibly on older kernels.

This changes behaviour on microblaze which had both mechanisms, now
SYS_ipc will be used instead of separate syscalls.
Diffstat (limited to 'src/ipc/shmctl.c')
-rw-r--r--src/ipc/shmctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ipc/shmctl.c b/src/ipc/shmctl.c
index c951a581..c2b2bb0d 100644
--- a/src/ipc/shmctl.c
+++ b/src/ipc/shmctl.c
@@ -17,7 +17,7 @@ int shmctl(int id, int cmd, struct shmid_ds *buf)
 		buf = &tmp;
 	}
 #endif
-#ifdef SYS_shmctl
+#ifndef SYS_ipc
 	int r = __syscall(SYS_shmctl, id, cmd | IPC_64, buf);
 #else
 	int r = __syscall(SYS_ipc, IPCOP_shmctl, id, cmd | IPC_64, 0, buf, 0);