@@ -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 __NR_msgget
+ return INLINE_SYSCALL_CALL (msgget, key, msgflg);
+#else
+ return INLINE_SYSCALL_CALL (ipc, IPCOP_msgget, key, msgflg, 0, NULL);
+#endif
}