summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/shmdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/shmdt.c')
-rw-r--r--sysdeps/unix/sysv/linux/shmdt.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/shmdt.c b/sysdeps/unix/sysv/linux/shmdt.c
index 7224d6fc17..58b722aa5b 100644
--- a/sysdeps/unix/sysv/linux/shmdt.c
+++ b/sysdeps/unix/sysv/linux/shmdt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -16,12 +16,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <sys/shm.h>
+#include <sys/msg.h>
#include <ipc_priv.h>
-
#include <sysdep.h>
-#include <sys/syscall.h>
+#include <errno.h>
/* Detach shared memory segment starting at address specified by SHMADDR
from the caller's data segment. */
@@ -29,5 +27,9 @@
int
shmdt (const void *shmaddr)
{
- return INLINE_SYSCALL (ipc, 5, IPCOP_shmdt, 0, 0, 0, (void *) shmaddr);
+#ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
+ return INLINE_SYSCALL_CALL (shmdt, shmaddr);
+#else
+ return INLINE_SYSCALL_CALL (ipc, IPCOP_shmdt, 0, 0, 0, shmaddr);
+#endif
}