Created attachment 249708 [details] patch
Might also backport https://github.com/libffi/libffi/commit/f64141ee3f9e455a060bd09e9ab72b6c94653d7c while at it
https://cgit.freebsd.org/ports/commit/?id=53f8b52eccda67f926c71465d38433b24828178c