From 4440ecf4a74b85341d5ecc1ecb1a9349b6fc5d3b Mon Sep 17 00:00:00 2001 From: Jimmy Tang Date: Wed, 23 Mar 2011 08:15:39 +0000 Subject: [PATCH] Define (__APPLE__) in StatFS At least on OSX 10.6.6 it appears to have the same defintions as FreeBSD. The build process doesn't complain and the code is enabled, this needs to be tested and checked more. --- StatFS.hsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/StatFS.hsc b/StatFS.hsc index 8b453dc199..45fd7e4db9 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__) +#if defined (__FreeBSD__) || defined(__APPLE__) # include # include #else @@ -84,7 +84,7 @@ data CStatfs #ifdef UNKNOWN #warning free space checking code not available for this OS #else -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__APPLE__) foreign import ccall unsafe "sys/mount.h statfs" #else foreign import ccall unsafe "sys/vfs.h statfs64"