summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@mit.edu>2013-03-10 01:51:08 -0800
committerEdward Z. Yang <ezyang@mit.edu>2013-03-10 01:51:08 -0800
commit197125fef19f3459059db5a0a323af63bff7adcf (patch)
treedee3a3614c7a23fc3bfce7e7c6b58e5741312d13
parent8ca03bce2b94f4cead3b82ee3719fb24437c92a9 (diff)
downloadhaskell-197125fef19f3459059db5a0a323af63bff7adcf.tar.gz
Use correct type for poll on Mac/FreeBSD, fixes ticket #7714.
Thanks Kazu Yamamoto for submitting this patch. Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
-rw-r--r--libraries/base/GHC/Event/Poll.hsc7
1 files changed, 4 insertions, 3 deletions
diff --git a/libraries/base/GHC/Event/Poll.hsc b/libraries/base/GHC/Event/Poll.hsc
index d73d813075..028a6166f0 100644
--- a/libraries/base/GHC/Event/Poll.hsc
+++ b/libraries/base/GHC/Event/Poll.hsc
@@ -31,7 +31,8 @@ import Control.Monad ((=<<), liftM, liftM2, unless)
import Data.Bits (Bits, (.|.), (.&.))
import Data.Maybe (Maybe(..))
import Data.Monoid (Monoid(..))
-import Foreign.C.Types (CInt(..), CShort(..), CULong(..))
+import Data.Word
+import Foreign.C.Types (CInt(..), CShort(..))
import Foreign.Ptr (Ptr)
import Foreign.Storable (Storable(..))
import GHC.Base
@@ -167,8 +168,8 @@ instance Storable PollFd where
#{poke struct pollfd, revents} ptr (pfdRevents p)
foreign import ccall safe "poll.h poll"
- c_poll :: Ptr PollFd -> CULong -> CInt -> IO CInt
+ c_poll :: Ptr PollFd -> (#type nfds_t) -> CInt -> IO CInt
foreign import ccall unsafe "poll.h poll"
- c_poll_unsafe :: Ptr PollFd -> CULong -> CInt -> IO CInt
+ c_poll_unsafe :: Ptr PollFd -> (#type nfds_t) -> CInt -> IO CInt
#endif /* defined(HAVE_POLL_H) */