[Pkg-haskell-commits] darcs: ghc: Disable the use of epoll_create1 and use epoll_create, as the former is not available on Linux kernels earlier than 2.6.27. http://hackage.haskell.org/trac/ghc/ticket/5005
Joachim Breitner
mail at joachim-breitner.de
Wed Mar 9 17:28:48 UTC 2011
Wed Mar 9 16:14:34 UTC 2011 Joachim Breitner <mail at joachim-breitner.de>
* Disable the use of epoll_create1 and use epoll_create, as the former is not available on Linux kernels earlier than 2.6.27. http://hackage.haskell.org/trac/ghc/ticket/5005
Ignore-this: 9f1e59276e957a220eb4a69349fa740c
M ./changelog +6
A ./patches/do_not_use_epoll_create1
M ./patches/series +1
Wed Mar 9 16:14:34 UTC 2011 Joachim Breitner <mail at joachim-breitner.de>
* Disable the use of epoll_create1 and use epoll_create, as the former is not available on Linux kernels earlier than 2.6.27. http://hackage.haskell.org/trac/ghc/ticket/5005
Ignore-this: 9f1e59276e957a220eb4a69349fa740c
diff -rN -u old-ghc/changelog new-ghc/changelog
--- old-ghc/changelog 2011-03-09 17:28:48.511183283 +0000
+++ new-ghc/changelog 2011-03-09 17:28:48.539184758 +0000
@@ -1,8 +1,14 @@
ghc (7.0.2-3) UNRELEASED; urgency=low
+ [ Iain Lane ]
* debian/rules: Build with -mminimal-toc on ppc64 — thanks to Colin
Watson for investigation and patch.
+ [ Joachim Breitner ]
+ * Disable the use of epoll_create1 and use epoll_create, as the former is
+ not available on Linux kernels earlier than 2.6.27.
+ http://hackage.haskell.org/trac/ghc/ticket/5005
+
-- Iain Lane <laney at ubuntu.com> Tue, 08 Mar 2011 11:11:37 +0000
ghc (7.0.2-2) experimental; urgency=low
diff -rN -u old-ghc/patches/do_not_use_epoll_create1 new-ghc/patches/do_not_use_epoll_create1
--- old-ghc/patches/do_not_use_epoll_create1 1970-01-01 00:00:00.000000000 +0000
+++ new-ghc/patches/do_not_use_epoll_create1 2011-03-09 17:28:48.527184126 +0000
@@ -0,0 +1,41 @@
+Index: ghc-7.0.2/libraries/base/System/Event/EPoll.hsc
+===================================================================
+--- ghc-7.0.2.orig/libraries/base/System/Event/EPoll.hsc 2011-03-09 21:31:56.000000000 +0530
++++ ghc-7.0.2/libraries/base/System/Event/EPoll.hsc 2011-03-09 21:31:57.000000000 +0530
+@@ -47,9 +47,7 @@
+ import GHC.Real (ceiling, fromIntegral)
+ import GHC.Show (Show)
+ import System.Posix.Internals (c_close)
+-#if !defined(HAVE_EPOLL_CREATE1)
+ import System.Posix.Internals (setCloseOnExec)
+-#endif
+ import System.Posix.Types (Fd(..))
+
+ import qualified System.Event.Array as A
+@@ -159,12 +157,8 @@
+ epollCreate :: IO EPollFd
+ epollCreate = do
+ fd <- throwErrnoIfMinus1 "epollCreate" $
+-#if defined(HAVE_EPOLL_CREATE1)
+- c_epoll_create1 (#const EPOLL_CLOEXEC)
+-#else
+ c_epoll_create 256 -- argument is ignored
+ setCloseOnExec fd
+-#endif
+ let !epollFd' = EPollFd fd
+ return epollFd'
+
+@@ -196,13 +190,8 @@
+ fromTimeout Forever = -1
+ fromTimeout (Timeout s) = ceiling $ 1000 * s
+
+-#if defined(HAVE_EPOLL_CREATE1)
+-foreign import ccall unsafe "sys/epoll.h epoll_create1"
+- c_epoll_create1 :: CInt -> IO CInt
+-#else
+ foreign import ccall unsafe "sys/epoll.h epoll_create"
+ c_epoll_create :: CInt -> IO CInt
+-#endif
+
+ foreign import ccall unsafe "sys/epoll.h epoll_ctl"
+ c_epoll_ctl :: CInt -> CInt -> CInt -> Ptr Event -> IO CInt
diff -rN -u old-ghc/patches/series new-ghc/patches/series
--- old-ghc/patches/series 2011-03-09 17:28:48.511183283 +0000
+++ new-ghc/patches/series 2011-03-09 17:28:48.539184758 +0000
@@ -5,3 +5,4 @@
use-debian-gen_contents_index
haddock-no-library
powerpc-compile-616635
+do_not_use_epoll_create1
More information about the Pkg-haskell-commits
mailing list