diff -Nru haskell-simple-sendfile-0.2.27/debian/changelog haskell-simple-sendfile-0.2.28/debian/changelog --- haskell-simple-sendfile-0.2.27/debian/changelog 2018-09-30 18:20:48.000000000 +0000 +++ haskell-simple-sendfile-0.2.28/debian/changelog 2019-08-08 13:32:18.000000000 +0000 @@ -1,3 +1,19 @@ +haskell-simple-sendfile (0.2.28-1build1) eoan; urgency=medium + + * Rebuild against new GHC abi. + + -- Gianfranco Costamagna Thu, 08 Aug 2019 15:32:18 +0200 + +haskell-simple-sendfile (0.2.28-1) unstable; urgency=medium + + [ Dmitry Bogatov ] + * Add missing "Upstream-Name" field into "debian/copyright". + + [ Clint Adams ] + * New upstream release + + -- Clint Adams Sat, 27 Jul 2019 23:10:53 -0400 + haskell-simple-sendfile (0.2.27-4) unstable; urgency=medium [ Clint Adams ] diff -Nru haskell-simple-sendfile-0.2.27/debian/copyright haskell-simple-sendfile-0.2.28/debian/copyright --- haskell-simple-sendfile-0.2.27/debian/copyright 2018-07-04 14:04:33.000000000 +0000 +++ haskell-simple-sendfile-0.2.28/debian/copyright 2019-07-28 03:10:53.000000000 +0000 @@ -1,5 +1,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: https://hackage.haskell.org/package/simple-sendfile +Upstream-Name: simple-sendfile Files: * Copyright: (c) 2009, IIJ Innovation Institute Inc. diff -Nru haskell-simple-sendfile-0.2.27/Network/Sendfile/BSD.hsc haskell-simple-sendfile-0.2.28/Network/Sendfile/BSD.hsc --- haskell-simple-sendfile-0.2.27/Network/Sendfile/BSD.hsc 2018-02-02 11:41:10.000000000 +0000 +++ haskell-simple-sendfile-0.2.28/Network/Sendfile/BSD.hsc 2019-01-21 02:04:37.000000000 +0000 @@ -1,4 +1,5 @@ {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE CPP #-} module Network.Sendfile.BSD ( sendfile @@ -57,14 +58,17 @@ -- is sent and bofore waiting the socket to be ready for writing. sendfileFd :: Socket -> Fd -> FileRange -> IO () -> IO () -sendfileFd sock fd range hook = +sendfileFd sock fd range hook = do +#if MIN_VERSION_network(3,0,0) + dst <- Fd <$> fdSocket sock +#else + let dst = Fd $ fdSocket sock +#endif alloca $ \sentp -> do let (off,len) = case range of EntireFile -> (0, entire) PartOfFile off' len' -> (fromInteger off', fromInteger len') sendloop dst fd off len sentp hook - where - dst = Fd $ fdSocket sock sendloop :: Fd -> Fd -> COff -> COff -> Ptr COff -> IO () -> IO () sendloop dst src off len sentp hook = do @@ -123,7 +127,12 @@ -- is sent and bofore waiting the socket to be ready for writing. sendfileFdWithHeader :: Socket -> Fd -> FileRange -> IO () -> [ByteString] -> IO () -sendfileFdWithHeader sock fd range hook hdr = +sendfileFdWithHeader sock fd range hook hdr = do +#if MIN_VERSION_network(3,0,0) + dst <- Fd <$> fdSocket sock +#else + let dst = Fd $ fdSocket sock +#endif alloca $ \sentp -> if isFreeBSD && hlen >= 8192 then do -- If the length of the header is larger than 8191, @@ -146,7 +155,6 @@ threadWaitWrite dst sendloop dst fd newoff newlen sentp hook where - dst = Fd $ fdSocket sock hlen = fromIntegral . sum . map BS.length $ hdr sendloopHeader :: Fd -> Fd -> COff -> COff -> Ptr COff -> [ByteString] -> COff -> IO (Maybe (COff, COff)) diff -Nru haskell-simple-sendfile-0.2.27/Network/Sendfile/Linux.hsc haskell-simple-sendfile-0.2.28/Network/Sendfile/Linux.hsc --- haskell-simple-sendfile-0.2.27/Network/Sendfile/Linux.hsc 2018-02-02 11:41:10.000000000 +0000 +++ haskell-simple-sendfile-0.2.28/Network/Sendfile/Linux.hsc 2019-01-21 02:04:37.000000000 +0000 @@ -1,4 +1,5 @@ {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE CPP #-} module Network.Sendfile.Linux ( sendfile @@ -91,9 +92,13 @@ -- default) and the file is large. The action is called after a chunk -- is sent and bofore waiting the socket to be ready for writing. sendfileFd :: Socket -> Fd -> FileRange -> IO () -> IO () -sendfileFd sock fd range hook = sendfileFd' dst fd range hook - where - dst = Fd $ fdSocket sock +sendfileFd sock fd range hook = do +#if MIN_VERSION_network(3,0,0) + dst <- Fd <$> fdSocket sock +#else + let dst = Fd $ fdSocket sock +#endif + sendfileFd' dst fd range hook sendfileFd' :: Fd -> Fd -> FileRange -> IO () -> IO () sendfileFd' dst src range hook = @@ -199,11 +204,15 @@ sendMsgMore :: Socket -> ByteString -> IO () sendMsgMore sock bs = withForeignPtr fptr $ \ptr -> do +#if MIN_VERSION_network(3,0,0) + s <- Fd <$> fdSocket sock +#else + let s = Fd $ fdSocket sock +#endif let buf = castPtr (ptr `plusPtr` off) siz = fromIntegral len sendloop s buf siz where - s = Fd $ fdSocket sock PS fptr off len = bs sendloop :: Fd -> Ptr CChar -> CSize -> IO () diff -Nru haskell-simple-sendfile-0.2.27/simple-sendfile.cabal haskell-simple-sendfile-0.2.28/simple-sendfile.cabal --- haskell-simple-sendfile-0.2.27/simple-sendfile.cabal 2018-02-02 11:41:10.000000000 +0000 +++ haskell-simple-sendfile-0.2.28/simple-sendfile.cabal 2019-01-21 02:04:37.000000000 +0000 @@ -1,5 +1,5 @@ Name: simple-sendfile -Version: 0.2.27 +Version: 0.2.28 Author: Kazu Yamamoto Maintainer: Kazu Yamamoto License: BSD3