$NetBSD: patch-af,v 1.5 2016/11/03 11:40:28 maya Exp $

Fixes to support the various NetBSD mips ports.

--- src/mips/ffi.c.orig	2014-11-08 12:47:24.000000000 +0000
+++ src/mips/ffi.c
@@ -472,6 +477,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif 
               ((cif->arg_types)[index]->type << (arg_reg * FFI_FLAG_BITS));
 	    arg_reg++;
 	    break;
+#ifdef __mips64
           case FFI_TYPE_LONGDOUBLE:
             /* Align it.  */
             arg_reg = ALIGN(arg_reg, 2);
@@ -490,7 +496,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif 
 		arg_reg++;
 	      }
             break;
-
+#endif
 	  case FFI_TYPE_STRUCT:
             loc = arg_reg * FFI_SIZEOF_ARG;
 	    cif->flags += calc_n32_struct_flags(soft_float,
@@ -552,6 +558,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif 
 	  cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 8);
 	break;
 
+#ifdef __mips64
       case FFI_TYPE_LONGDOUBLE:
 	/* Long double is returned as if it were a struct containing
 	   two doubles.  */
@@ -568,6 +575,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif 
 					      << (4 + (FFI_FLAG_BITS * 8));
 	  }
 	break;
+#endif
       default:
 	cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 8);
 	break;
