summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/semget.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/semget.c')
-rw-r--r--sysdeps/unix/sysv/linux/semget.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/semget.c b/sysdeps/unix/sysv/linux/semget.c
index 52189fd693..e220b3a031 100644
--- a/sysdeps/unix/sysv/linux/semget.c
+++ b/sysdeps/unix/sysv/linux/semget.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/sem.h>
#include <ipc_priv.h>
-#include <stdlib.h> /* for definition of NULL */
-
#include <sysdep.h>
-#include <sys/syscall.h>
+#include <errno.h>
/* Return identifier for array of NSEMS semaphores associated with
KEY. */
@@ -30,5 +27,9 @@
int
semget (key_t key, int nsems, int semflg)
{
- return INLINE_SYSCALL (ipc, 5, IPCOP_semget, key, nsems, semflg, NULL);
+#ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
+ return INLINE_SYSCALL_CALL (semget, key, nsems, semflg);
+#else
+ return INLINE_SYSCALL_CALL (ipc, IPCOP_semget, key, nsems, semflg, NULL);
+#endif
}