Taken from https://raw.githubusercontent.com/archlinux/svntogit-community/packages/haskell-bytestring-handle/trunk/ghc9.patch --- bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Write.hs.orig 2021-06-21 14:54:12.217134401 +0800 +++ bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Write.hs 2021-06-21 15:24:01.794796505 +0800 @@ -17,7 +17,7 @@ import GHC.IO.Buffer ( BufferState(..), emptyBuffer, Buffer(..) ) import GHC.IO.BufferedIO ( BufferedIO(..) ) -import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..) ) +import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..), RawIO(..) ) #if MIN_VERSION_base(4,5,0) import GHC.IO.Encoding ( getLocaleEncoding ) #else @@ -138,6 +138,7 @@ seek_base = error "seek_base needs to be updated" }) modifyIORef (write_size ws) (`max` newSeekPos) + pure newSeekPos tell ws = do ss <- readIORef (write_seek_state ws) @@ -152,6 +153,12 @@ devType _ = return RegularFile -- TODO: is this correct? +instance RawIO WriteState where + read _ _ _ _ = return 0 + readNonBlocking _ _ _ _ = return Nothing + write _ _ _ _ = return () + writeNonBlocking _ _ _ _ = return 0 + ioe_seekOutOfRange :: IO a ioe_seekOutOfRange = ioException $ IOError Nothing InvalidArgument "" --- bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Read.hs.orig 2021-06-21 14:53:55.433129276 +0800 +++ bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Read.hs 2021-06-21 15:24:25.998784996 +0800 @@ -24,7 +24,7 @@ , emptyBuffer, isEmptyBuffer, newBuffer, newByteBuffer , bufferElems, withBuffer, withRawBuffer ) import GHC.IO.BufferedIO ( BufferedIO(..) ) -import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..) ) +import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..), RawIO(..) ) #if MIN_VERSION_base(4,5,0) import GHC.IO.Encoding ( getLocaleEncoding ) #else @@ -155,7 +155,7 @@ (seek_before_length curSeekState) (fromIntegral (seek_pos curSeekState) + seekPos) SeekFromEnd -> normalisedSeekState (read_chunks_backwards rs) [] (read_length rs) seekPos - maybe ioe_seekOutOfRange (writeIORef (read_seek_state rs)) newSeekState + maybe ioe_seekOutOfRange (\nss -> writeIORef (read_seek_state rs) nss >> pure (fromIntegral(seek_pos nss))) newSeekState tell rs = do ss <- readIORef (read_seek_state rs) @@ -166,6 +166,12 @@ devType _ = return RegularFile -- TODO: is this correct? +instance RawIO ReadState where + read _ _ _ _ = return 0 + readNonBlocking _ _ _ _ = return Nothing + write _ _ _ _ = return () + writeNonBlocking _ _ _ _ = return 0 + ioe_seekOutOfRange :: IO a ioe_seekOutOfRange = ioException $ IOError Nothing InvalidArgument "" t message (Expand)Author 2023-02-19gnu: linux-libre: Consistently provide the drop_monitor module....This is needed by, e.g., <https://github.com/nhorman/dropwatch>. Build it as a module everywhere for consistency. * gnu/packages/aux-files/linux-libre/4.14-i686.conf: Set CONFIG_NET_DROP_MONITOR=m. * gnu/packages/aux-files/linux-libre/4.14-x86_64.conf: Likewise. * gnu/packages/aux-files/linux-libre/4.19-i686.conf: Likewise. * gnu/packages/aux-files/linux-libre/4.19-x86_64.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.10-arm.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.10-arm64.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.10-i686.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.10-x86_64.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.15-arm.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.15-arm64.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.15-i686.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.15-x86_64.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.4-arm.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.4-arm64.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.4-i686.conf: Likewise. * gnu/packages/aux-files/linux-libre/5.4-x86_64.conf: Likewise. * gnu/packages/aux-files/linux-libre/6.1-arm.conf: Likewise. * gnu/packages/aux-files/linux-libre/6.1-arm64.conf: Likewise. * gnu/packages/aux-files/linux-libre/6.1-i686.conf: Likewise. * gnu/packages/aux-files/linux-libre/6.1-x86_64.conf: Likewise. Reported by mirai in #guix. Tobias Geerinckx-Rice