c99b38
diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c
c99b38
index 1a80b2b..b997e23 100644
c99b38
--- a/ext/fiddle/closure.c
c99b38
+++ b/ext/fiddle/closure.c
2b6417
@@ -13,22 +13,11 @@ typedef struct {
c99b38
     ffi_type **argv;
c99b38
 } fiddle_closure;
c99b38
 
c99b38
-#if defined(USE_FFI_CLOSURE_ALLOC)
2b6417
-#elif !defined(HAVE_FFI_CLOSURE_ALLOC)
c99b38
-# define USE_FFI_CLOSURE_ALLOC 0
c99b38
-#else
c99b38
-# define USE_FFI_CLOSURE_ALLOC 1
c99b38
-#endif
c99b38
-
c99b38
 static void
c99b38
 dealloc(void * ptr)
c99b38
 {
c99b38
     fiddle_closure * cls = (fiddle_closure *)ptr;
c99b38
-#if USE_FFI_CLOSURE_ALLOC
c99b38
     ffi_closure_free(cls->pcl);
c99b38
-#else
c99b38
-    munmap(cls->pcl, sizeof(*cls->pcl));
c99b38
-#endif
c99b38
     if (cls->argv) xfree(cls->argv);
c99b38
     xfree(cls);
c99b38
 }
2b6417
@@ -202,12 +188,7 @@ allocate(VALUE klass)
c99b38
     VALUE i = TypedData_Make_Struct(klass, fiddle_closure,
c99b38
 	    &closure_data_type, closure);
c99b38
 
c99b38
-#if USE_FFI_CLOSURE_ALLOC
c99b38
     closure->pcl = ffi_closure_alloc(sizeof(ffi_closure), &closure->code);
c99b38
-#else
c99b38
-    closure->pcl = mmap(NULL, sizeof(ffi_closure), PROT_READ | PROT_WRITE,
c99b38
-        MAP_ANON | MAP_PRIVATE, -1, 0);
c99b38
-#endif
c99b38
 
c99b38
     return i;
c99b38
 }
2b6417
@@ -254,17 +238,8 @@ initialize(int rbargc, VALUE argv[], VALUE self)
c99b38
     if (FFI_OK != result)
c99b38
 	rb_raise(rb_eRuntimeError, "error prepping CIF %d", result);
c99b38
 
c99b38
-#if USE_FFI_CLOSURE_ALLOC
c99b38
     result = ffi_prep_closure_loc(pcl, cif, callback,
c99b38
 		(void *)self, cl->code);
c99b38
-#else
c99b38
-    result = ffi_prep_closure(pcl, cif, callback, (void *)self);
c99b38
-    cl->code = (void *)pcl;
c99b38
-    i = mprotect(pcl, sizeof(*pcl), PROT_READ | PROT_EXEC);
c99b38
-    if (i) {
c99b38
-	rb_sys_fail("mprotect");
c99b38
-    }
c99b38
-#endif
c99b38
 
c99b38
     if (FFI_OK != result)
c99b38
 	rb_raise(rb_eRuntimeError, "error prepping closure %d", result);