[PATCH] wrap functions in base for android

Hey, When compiling the cross compiler for android, it fails because of undefined symbols to mkfifo, tcgetattr and tcsetattr. This seems to be because the android ndk defines them as inline. This patch wraps them (when compiling for android) in __mkfifo __tcgetattr and __tcsetattr.

On 25/01/13 08:36, Nathan Hüsken wrote:
Hey,
When compiling the cross compiler for android, it fails because of undefined symbols to mkfifo, tcgetattr and tcsetattr. This seems to be because the android ndk defines them as inline.
This patch wraps them (when compiling for android) in __mkfifo __tcgetattr and __tcsetattr.
If you're just using straightforward wrappers, a better way to do it is to declare the foreign import with 'capi' instead of 'ccall'. This generates the wrapper for you. Cheers, Simon

On 01/29/2013 11:29 AM, Simon Marlow wrote:
On 25/01/13 08:36, Nathan Hüsken wrote:
Hey,
When compiling the cross compiler for android, it fails because of undefined symbols to mkfifo, tcgetattr and tcsetattr. This seems to be because the android ndk defines them as inline.
This patch wraps them (when compiling for android) in __mkfifo __tcgetattr and __tcsetattr.
If you're just using straightforward wrappers, a better way to do it is to declare the foreign import with 'capi' instead of 'ccall'. This generates the wrapper for you.
Appended is an updated patch. Regards, Nathan
participants (2)
-
Nathan Hüsken
-
Simon Marlow