capi uses the C compiler to make the call, requiring ghc to write out and compile a C stub file for each import. This guarantees C compatibility and also works with cpp-defined symbols.
ccall attempts to emulate what the C compiler does with generated assembly language, but may get it wrong on Darwin; I recall Moritz Angermann saying someone would have to dump out the generated assembly from both cases to see what's different and what needs to change for ccall to work on Darwin.
Possible differences include not zeroing the upper parts of registers with 32-bit values in them and not treating other registers properly (for example, getting caller-saved registers wrong). It's also conceivable that there's a cpp macro involved normally and there's a hidden bug in a fallback libSystem version of a function. Someone will have to examine the generated assembly as above to see what's actually wrong.