openbsd-ports/x11/xmobar/patches/patch-src_StatFS_hsc
kili d50a046b80 Update to xmobar-0.13.
From maintainer Jona Joachim, based on a diff by Ido Admon.
2011-06-13 21:23:04 +00:00

26 lines
757 B
Plaintext

$OpenBSD: patch-src_StatFS_hsc,v 1.1 2011/06/13 21:23:04 kili Exp $
--- src/StatFS.hsc.orig Sun Mar 27 19:16:24 2011
+++ src/StatFS.hsc Mon May 2 20:32:56 2011
@@ -23,8 +23,11 @@ import Foreign.C.String
import Data.ByteString (useAsCString)
import Data.ByteString.Char8 (pack)
-#if defined (__FreeBSD__) || defined (__APPLE__)
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
# include <sys/param.h>
+#endif
+
+#if defined(BSD4_4)
# include <sys/mount.h>
#else
# include <sys/vfs.h>
@@ -47,7 +50,7 @@ data FileSystemStats = FileSystemStats {
data CStatfs
-#if defined (__FreeBSD__) || defined (__APPLE__)
+#if defined(BSD4_4)
foreign import ccall unsafe "sys/mount.h statfs"
#else
foreign import ccall unsafe "sys/vfs.h statfs64"