bca718
Backport of this upstream commit, with ports/ readded to the path.
bca718
bca718
commit 5c40c3bab2fddaca8cfe12d75944d1fef8adf1a4
bca718
Author: Alan Hayward <alan.hayward@arm.com>
bca718
Date:   Tue Nov 11 16:32:34 2014 +0000
bca718
bca718
    [AArch64] Add ipc.h.
bca718
    
bca718
    Adding ipc.h for AArch64 adjusted to behave correctly on big endian
bca718
    targets.
bca718
bca718
diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/bits/ipc.h b/ports/sysdeps/unix/sysv/linux/aarch64/bits/ipc.h
bca718
new file mode 100644
bca718
index 0000000..aa50eb0
bca718
--- /dev/null
bca718
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/bits/ipc.h
bca718
@@ -0,0 +1,54 @@
bca718
+/* Copyright (C) 1995-2014 Free Software Foundation, Inc.
bca718
+   This file is part of the GNU C Library.
bca718
+
bca718
+   The GNU C Library is free software; you can redistribute it and/or
bca718
+   modify it under the terms of the GNU Lesser General Public
bca718
+   License as published by the Free Software Foundation; either
bca718
+   version 2.1 of the License, or (at your option) any later version.
bca718
+
bca718
+   The GNU C Library is distributed in the hope that it will be useful,
bca718
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
bca718
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
bca718
+   Lesser General Public License for more details.
bca718
+
bca718
+   You should have received a copy of the GNU Lesser General Public
bca718
+   License along with the GNU C Library; if not, see
bca718
+   <http://www.gnu.org/licenses/>.  */
bca718
+
bca718
+#ifndef _SYS_IPC_H
bca718
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
bca718
+#endif
bca718
+
bca718
+#include <bits/types.h>
bca718
+
bca718
+/* Mode bits for `msgget', `semget', and `shmget'.  */
bca718
+#define IPC_CREAT	01000		/* Create key if key does not exist. */
bca718
+#define IPC_EXCL	02000		/* Fail if key exists.  */
bca718
+#define IPC_NOWAIT	04000		/* Return error on wait.  */
bca718
+
bca718
+/* Control commands for `msgctl', `semctl', and `shmctl'.  */
bca718
+#define IPC_RMID	0		/* Remove identifier.  */
bca718
+#define IPC_SET		1		/* Set `ipc_perm' options.  */
bca718
+#define IPC_STAT	2		/* Get `ipc_perm' options.  */
bca718
+#ifdef __USE_GNU
bca718
+# define IPC_INFO	3		/* See ipcs.  */
bca718
+#endif
bca718
+
bca718
+/* Special key values.  */
bca718
+#define IPC_PRIVATE	((__key_t) 0)	/* Private key.  */
bca718
+
bca718
+
bca718
+/* Data structure used to pass permission information to IPC operations.  */
bca718
+struct ipc_perm
bca718
+  {
bca718
+    __key_t __key;			/* Key.  */
bca718
+    __uid_t uid;			/* Owner's user ID.  */
bca718
+    __gid_t gid;			/* Owner's group ID.  */
bca718
+    __uid_t cuid;			/* Creator's user ID.  */
bca718
+    __gid_t cgid;			/* Creator's group ID.  */
bca718
+    unsigned int mode;			/* Read/write permission.  */
bca718
+    unsigned short int __seq;		/* Sequence number.  */
bca718
+    unsigned short int __pad1;
bca718
+    __syscall_ulong_t __glibc_reserved1;
bca718
+    __syscall_ulong_t __glibc_reserved2;
bca718
+  };