diff options
| author | Edward Z. Yang <ezyang@mit.edu> | 2013-03-10 01:51:08 -0800 |
|---|---|---|
| committer | Edward Z. Yang <ezyang@mit.edu> | 2013-03-10 01:51:08 -0800 |
| commit | 197125fef19f3459059db5a0a323af63bff7adcf (patch) | |
| tree | dee3a3614c7a23fc3bfce7e7c6b58e5741312d13 | |
| parent | 8ca03bce2b94f4cead3b82ee3719fb24437c92a9 (diff) | |
| download | haskell-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.hsc | 7 |
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) */ |
