From 0cd70cb5c0c33ce5db2a68fb0c76341f9d71f400 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Mar 2011 13:10:20 -0400 Subject: [PATCH] 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. --- StatFS.hsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/StatFS.hsc b/StatFS.hsc index dd0c90bebd..0828f1378c 100644 --- a/StatFS.hsc +++ b/StatFS.hsc @@ -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 # include #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"