snoyberg/conduit — pull request #99 by cjwatson (2013-05-27 11:09:15+00:00)
Title: Avoid variadic open

GHC's LLVM backend doesn't properly handle multiple foreign imports of the same C function with different argument counts; only a declaration for the last one is emitted, and thus openRead fails to compile with "error: not enough parameters specified for call". Since the mode argument is ignored if O_CREAT is not in the flags, it is safe to just pass it anyway.

You can see the failure that prompted this here:

https://launchpadlibrarian.net/140806785/buildlog_ubuntu-saucy-armhf.haskell-conduit_1.0.5-1_FAILEDTOBUILD.txt.gz