kazu-yamamoto / simple-sendfile

Cross platform library for the sendfile system call
BSD 3-Clause "New" or "Revised" License
15 stars 11 forks source link

Add allow-bsd flag for Debian GNU/kFreeBSD #13

Closed cjwatson closed 11 years ago

cjwatson commented 11 years ago

On Debian GNU/kFreeBSD (FreeBSD kernel plus glibc), the BSD flavour of sendfile is not usable (struct sf_hdtr is declared with -D_BSD_SOURCE=1, but has no definition), and the Linux flavour doesn't work either since MSG_MORE is absent. However, the fallback version works fine.

Unfortunately, Cabal treats kfreebsdgnu as os(freebsd), and os(kfreebsdgnu) doesn't work. So, to make it possible to select the fallback implementation on GNU/kFreeBSD, I believe a flag is necessary.

kazu-yamamoto commented 11 years ago

Sorry for the delay. I will release a new version.