It is quite probable that OpenBSD forbids executing code in the C heap, for security reasons I guess. Usually there is a way to tell the operating system that a certain range of addresses contains executable code. I have no clue what this is on OpenBSD. If you do find out or someone on the list knows, please let me know.
Is this the only way to have a Scheme defined function passed on the fly to C? Short of using global variables as in here https://mercure.iro.umontreal.ca/pipermail/gambit-list/2009-January/002939.h...
By the way, towards the end of this post, you point out the correct option to configure.
michele