Sorry for not exactly being helpful with your issue, but that one is the exact reason I started on https://git.sr.ht/~ft/npe. APE is too limiting and sometimes it's easier to rewrite small parts of the software being ported with plan 9 libc-specific api. I also did a small write-up on porting in general some time ago: http://wiki.9front.org/porting.
------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Teb3e52c23bb1bca4-M02c029a72d055f22324ee8e0 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription