[commit: base] master: Use correct type for poll on Mac/FreeBSD, fixes ticket #7714. (25b44d2)
Edward Z. Yang
ezyang at MIT.EDU
Sun Mar 10 10:52:11 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/25b44d2e089e3aa030f146e2c52601146c8d126a
>---------------------------------------------------------------
commit 25b44d2e089e3aa030f146e2c52601146c8d126a
Author: Edward Z. Yang <ezyang at mit.edu>
Date: Sun Mar 10 01:51:08 2013 -0800
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 at mit.edu>
>---------------------------------------------------------------
GHC/Event/Poll.hsc | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/GHC/Event/Poll.hsc b/GHC/Event/Poll.hsc
index d73d813..028a616 100644
--- a/GHC/Event/Poll.hsc
+++ b/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) */
More information about the ghc-commits
mailing list