Patch borrowed from OpenEmbedded, available at
/meta/recipes-extended/libaio/libaio/00_arches.patch in their source
tree. This patch has been modified to only add the MIPS definitions.
The patch adds MIPS specific definitions (syscall number and macros).
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Index: libaio-0.3.110/src/syscall.h
===================================================================
--- libaio-0.3.110.orig/src/syscall.h
+++ libaio-0.3.110/src/syscall.h
#include "syscall-sparc.h"
#elif defined(__aarch64__)
#include "syscall-arm64.h"
+#include "syscall-mips.h"
#warning "using generic syscall method"
#include "syscall-generic.h"
Index: libaio-0.3.110/src/syscall-mips.h
===================================================================
+++ libaio-0.3.110/src/syscall-mips.h
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
+ * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto
+ * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A
+#define _MIPS_SIM_ABI32 1
+#define _MIPS_SIM_NABI32 2
+#define _MIPS_SIM_ABI64 3
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+ * Linux o32 style syscalls are in the range from 4000 to 4999.
+#define __NR_io_setup (__NR_Linux + 241)
+#define __NR_io_destroy (__NR_Linux + 242)
+#define __NR_io_getevents (__NR_Linux + 243)
+#define __NR_io_submit (__NR_Linux + 244)
+#define __NR_io_cancel (__NR_Linux + 245)
+#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
+#if _MIPS_SIM == _MIPS_SIM_ABI64
+ * Linux 64-bit syscalls are in the range from 5000 to 5999.