summaryrefslogtreecommitdiff
path: root/devel/libffi/patches
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2012-10-09 01:07:55 +0000
committerjmmv <jmmv@pkgsrc.org>2012-10-09 01:07:55 +0000
commita6bb16f51fa38c5b410a769c82eaaf4e45c06d25 (patch)
tree54202fc3610b91ce865533a51038d28fd1499b16 /devel/libffi/patches
parentdddaf217d03697c70e0d6e23198ae2ba9ca63349 (diff)
downloadpkgsrc-a6bb16f51fa38c5b410a769c82eaaf4e45c06d25.tar.gz
Fix build under NetBSD/macppc.
Diffstat (limited to 'devel/libffi/patches')
-rw-r--r--devel/libffi/patches/patch-ak19
1 files changed, 19 insertions, 0 deletions
diff --git a/devel/libffi/patches/patch-ak b/devel/libffi/patches/patch-ak
new file mode 100644
index 00000000000..9263b93531d
--- /dev/null
+++ b/devel/libffi/patches/patch-ak
@@ -0,0 +1,19 @@
+$NetBSD: patch-ak,v 1.1 2012/10/09 01:07:55 jmmv Exp $
+
+Avoid a duplicate case statement under powerpc, as the FFI_TYPE_LONGDOUBLE
+and FFI_TYPE_DOUBLE constants are defined to the same value.
+
+--- src/powerpc/ffi.c.orig 2012-04-12 02:46:06.000000000 +0000
++++ src/powerpc/ffi.c
+@@ -664,9 +664,11 @@ ffi_prep_cif_machdep (ffi_cif *cif)
+ switch (type)
+ {
+ #ifndef __NO_FPRS__
++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+ case FFI_TYPE_LONGDOUBLE:
+ flags |= FLAG_RETURNS_128BITS;
+ /* Fall through. */
++#endif
+ case FFI_TYPE_DOUBLE:
+ flags |= FLAG_RETURNS_64BITS;
+ /* Fall through. */