So to the top add #define PERL_NO_GET_CONTEXT PERL_NO_GET_CONTEXT doesn't work with Inline::C.
You can do
pre_head => '#define PERL_NO_GET_CONTEXT 1', and that will get the directive inserted at the very beginning of the generated XS file (where it needs to be).
But Inline::C is not presently capable of generating XS code that meets the requirements of having PERL_NO_GET_CONTEXT defined.
I filed
a bug report about this some time back.
InlineX::C2XS contains a rather flakey, fragile, sub-standard hack that does accommodate PERL_NO_GET_CONTEXT.
It's functional enough for my purposes, but it does impose some limitations on the way one formats one's C code.
Cheers,
Rob