Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
Googling some on the code snippet you showed us, I found the other half:
- source, the kernel return value will be converted by a stub in libc, and
- if compiling source with __DARWIN_UNIX03, the conversion in libc is not
- done, and the caller gets the expected (discrete) value.
Yes, I saw that piece of code as well on my MacBook.
So, it seems that what we are missing is the "stub in libc" that should convert 102 to 45 for us. Which I guess means we are linking wrong.
Sounds sensible. However, except for using a MacBook, I'm not a Mac expert at all. So I wouldn't be able to confirm, nor deny this, and definitely don't know how to fix it properly.