aboutsummaryrefslogtreecommitdiff
path: root/libffi/testsuite/libffi.call/cls_6byte.c
diff options
context:
space:
mode:
Diffstat (limited to 'libffi/testsuite/libffi.call/cls_6byte.c')
-rw-r--r--libffi/testsuite/libffi.call/cls_6byte.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libffi/testsuite/libffi.call/cls_6byte.c b/libffi/testsuite/libffi.call/cls_6byte.c
index 5eb17d2..0c1ab28 100644
--- a/libffi/testsuite/libffi.call/cls_6byte.c
+++ b/libffi/testsuite/libffi.call/cls_6byte.c
@@ -47,13 +47,21 @@ cls_struct_6byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
int main (void)
{
ffi_cif cif;
+#ifndef USING_MMAP
static ffi_closure cl;
- ffi_closure *pcl = &cl;
+#endif
+ ffi_closure *pcl;
void* args_dbl[5];
ffi_type* cls_struct_fields[5];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
+#ifdef USING_MMAP
+ pcl = allocate_mmap (sizeof(ffi_closure));
+#else
+ pcl = &cl;
+#endif
+
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;