Use explicit language extensions & remove extension fields from base.cabal
[ghc-base.git] / NHC / PosixTypes.hsc
index b5ad5c6..efae04e 100644 (file)
@@ -1,4 +1,6 @@
+{-# LANGUAGE CPP #-}
 {-# OPTIONS_NHC98 -I/usr/include #-}
+
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  NHC.PosixTypes
@@ -51,7 +53,9 @@ import Control.Monad
 -- Curious hack to ensure that the CTypes macros are expanded *after* hsc2hs.
 ##include "CTypes.h"
 -- C header files that contain all the types we are looking for here.
+#if __APPLE__
 #include <libc.h>
+#endif
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/resource.h>