]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libffi/testsuite/libffi.call/cls_ushort.c
acinclude.m4: Add AC_FUNC_MMAP_BLACKLIST.
[thirdparty/gcc.git] / libffi / testsuite / libffi.call / cls_ushort.c
index 3599f6776a5d18fd8a2f906902384a2880044bc4..f6626b9c30ca1ac3d08c4037b1fc96a3bdf49379 100644 (file)
@@ -20,11 +20,19 @@ typedef unsigned short (*cls_ret_ushort)(unsigned short);
 int main (void)
 {
   ffi_cif cif;
+#ifndef USING_MMAP
   static ffi_closure cl;
-  ffi_closure *pcl = &cl;
+#endif
+  ffi_closure *pcl;
   ffi_type * cl_arg_types[2];
   unsigned short res;
 
+#ifdef USING_MMAP
+  pcl = allocate_mmap (sizeof(ffi_closure));
+#else
+  pcl = &cl;
+#endif
+
   cl_arg_types[0] = &ffi_type_ushort;
   cl_arg_types[1] = NULL;