Files
2014-11-05 12:41:07 +01:00

41 lines
922 B
Plaintext

$NetBSD: patch-ae,v 1.6 2014/02/11 07:21:28 dholland Exp $
Make a minimal adjustment to support the various NetBSD mips ports.
--- src/mips/ffitarget.h.orig 2012-04-12 02:46:06.000000000 +0000
+++ src/mips/ffitarget.h
@@ -32,7 +32,7 @@
#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
#endif
-#ifdef linux
+#if defined(linux)
# include <asm/sgidefs.h>
#elif defined(__rtems__)
/*
@@ -41,8 +41,10 @@
#define _MIPS_SIM_ABI32 1
#define _MIPS_SIM_NABI32 2
#define _MIPS_SIM_ABI64 3
-#elif !defined(__OpenBSD__)
+#elif defined(__sgi)
# include <sgidefs.h>
+#else
+# include <sys/cdefs.h>
#endif
# ifndef _ABIN32
@@ -55,6 +57,12 @@
# define _ABIO32 _MIPS_SIM_ABI32
# endif
+#ifdef __NetBSD__
+/* Let's cheat a bit... */
+# define _ABIO32 1
+# define _MIPS_SIM _ABIO32
+#endif
+
#if !defined(_MIPS_SIM)
# error -- something is very wrong --
#else