summaryrefslogtreecommitdiff
path: root/libffi/testsuite/libffi.call/cls_float.c
diff options
context:
space:
mode:
Diffstat (limited to 'libffi/testsuite/libffi.call/cls_float.c')
-rw-r--r--libffi/testsuite/libffi.call/cls_float.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libffi/testsuite/libffi.call/cls_float.c b/libffi/testsuite/libffi.call/cls_float.c
index bd1601ebc78..ac4ec482b0f 100644
--- a/libffi/testsuite/libffi.call/cls_float.c
+++ b/libffi/testsuite/libffi.call/cls_float.c
@@ -21,11 +21,19 @@ typedef float (*cls_ret_float)(float);
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];
float res;
+#ifdef USING_MMAP
+ pcl = allocate_mmap (sizeof(ffi_closure));
+#else
+ pcl = &cl;
+#endif
+
cl_arg_types[0] = &ffi_type_float;
cl_arg_types[1] = NULL;