summaryrefslogtreecommitdiff
path: root/libffi/testsuite/libffi.special/unwindtest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libffi/testsuite/libffi.special/unwindtest.cc')
-rw-r--r--libffi/testsuite/libffi.special/unwindtest.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/libffi/testsuite/libffi.special/unwindtest.cc b/libffi/testsuite/libffi.special/unwindtest.cc
index d393a50f6a4..7261a0781a4 100644
--- a/libffi/testsuite/libffi.special/unwindtest.cc
+++ b/libffi/testsuite/libffi.special/unwindtest.cc
@@ -49,10 +49,18 @@ typedef int (*closure_test_type1)(float, float, float, float, signed 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[17];
int res;
+#ifdef USING_MMAP
+ pcl = allocate_mmap (sizeof(ffi_closure));
+#else
+ pcl = &cl;
+#endif
+
{
cl_arg_types[1] = NULL;