blob: 2c5c3e9630bd98c908a3c4d9ee47fd80b8874ecc [file] [log] [blame]
Index: libffi/configure.ac
===================================================================
--- libffi.orig/configure.ac
+++ libffi/configure.ac
@@ -133,7 +133,7 @@ case "$host" in
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
TARGET=MIPS; TARGETDIR=mips
;;
- mips*-*-linux*)
+ mips*-*-linux* | mips*-*-openbsd*)
# Support 128-bit long double for NewABI.
HAVE_LONG_DOUBLE='defined(__mips64)'
TARGET=MIPS; TARGETDIR=mips
Index: libffi/src/mips/ffi.c
===================================================================
--- libffi.orig/src/mips/ffi.c
+++ libffi/src/mips/ffi.c
@@ -38,7 +38,11 @@
#endif
#ifndef USE__BUILTIN___CLEAR_CACHE
-#include <sys/cachectl.h>
+# if defined(__OpenBSD__)
+# include <mips64/sysarch.h>
+# else
+# include <sys/cachectl.h>
+# endif
#endif
#ifdef FFI_DEBUG
Index: libffi/src/mips/ffitarget.h
===================================================================
--- libffi.orig/src/mips/ffitarget.h
+++ libffi/src/mips/ffitarget.h
@@ -36,7 +36,7 @@
#define _MIPS_SIM_ABI32 1
#define _MIPS_SIM_NABI32 2
#define _MIPS_SIM_ABI64 3
-#else
+#elif !defined(__OpenBSD__)
# include <sgidefs.h>
#endif