kFreeBSD support

Tested on Debian kfreebsd-amd64. The BSD #includes worked. Both statfs64
and statfs worked. Using statfs to keep the same as general freebsd, and
because I didn't try it on 32 bit.
This commit is contained in:
Joey Hess 2011-03-23 13:10:20 -04:00
parent b9c4c006bd
commit 0cd70cb5c0

View file

@ -53,7 +53,7 @@ import Foreign.C.String
import Data.ByteString (useAsCString)
import Data.ByteString.Char8 (pack)
#if defined (__FreeBSD__) || defined (__APPLE__)
#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
# include <sys/param.h>
# include <sys/mount.h>
#else
@ -87,7 +87,7 @@ data CStatfs
#if defined(__APPLE__)
foreign import ccall unsafe "sys/mount.h statfs64"
#else
#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
foreign import ccall unsafe "sys/mount.h statfs"
#else
foreign import ccall unsafe "sys/vfs.h statfs64"