summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/msgget.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/msgget.c')
-rw-r--r--sysdeps/unix/sysv/linux/msgget.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/msgget.c b/sysdeps/unix/sysv/linux/msgget.c
index ef98c75861..21cbb05d95 100644
--- a/sysdeps/unix/sysv/linux/msgget.c
+++ b/sysdeps/unix/sysv/linux/msgget.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,13 +16,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
#include <sys/msg.h>
#include <ipc_priv.h>
-#include <stdlib.h> /* for definition of NULL */
-
#include <sysdep.h>
-#include <sys/syscall.h>
+#include <errno.h>
/* Return descriptor for message queue associated with KEY. The MSGFLG
parameter describes how to proceed with clashing of key values. */
@@ -30,5 +27,9 @@
int
msgget (key_t key, int msgflg)
{
- return INLINE_SYSCALL (ipc, 5, IPCOP_msgget, key, msgflg, 0, NULL);
+#ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
+ return INLINE_SYSCALL_CALL (msgget, key, msgflg);
+#else
+ return INLINE_SYSCALL_CALL (ipc, IPCOP_msgget, key, msgflg, 0, NULL);
+#endif
}