pkgsrc/devel/libffi/patches/patch-ae
ryoon aee0bcc277 Fix PR/47199
Restore _MIPS_SIM workaround, removed during updating to rev. 1.4 of patch-ae.
Functionality is not tested yet.
2012-12-18 12:33:07 +00:00

40 lines
918 B
Text

$NetBSD: patch-ae,v 1.5 2012/12/18 12:33:07 ryoon 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(irix)
# 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