From 1ee6c6f5ace766f8db146a867d8cbf79220e7fe6 Mon Sep 17 00:00:00 2001 From: Matthew Craven <clyring@gmail.com> Date: Sat, 8 Jul 2023 12:57:42 -0400 Subject: [PATCH] Allow bytestring-0.12 --- System/Posix/Env/ByteString.hsc | 4 ++-- unix.cabal | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/System/Posix/Env/ByteString.hsc b/System/Posix/Env/ByteString.hsc index 5780ca4..0b2fe6f 100644 --- a/System/Posix/Env/ByteString.hsc +++ b/System/Posix/Env/ByteString.hsc @@ -42,7 +42,7 @@ import System.Posix.Env ( clearEnv ) import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC import Data.ByteString (ByteString) -import Data.ByteString.Internal (ByteString (PS), memcpy) +import Data.ByteString.Internal (ByteString (PS)) import qualified System.Posix.Env.Internal as Internal @@ -133,7 +133,7 @@ putEnv (PS fp o l) = withForeignPtr fp $ \p -> do -- -- hence we must not free the buffer buf <- mallocBytes (l+1) - memcpy buf (p `plusPtr` o) l + copyBytes buf (p `plusPtr` o) l pokeByteOff buf l (0::Word8) throwErrnoIfMinus1_ "putenv" (c_putenv (castPtr buf)) diff --git a/unix.cabal b/unix.cabal index 73f69ba..104d262 100644 --- a/unix.cabal +++ b/unix.cabal @@ -70,7 +70,7 @@ library build-depends: base >= 4.10 && < 4.20, - bytestring >= 0.9.2 && < 0.12, + bytestring >= 0.9.2 && < 0.13, filepath >= 1.4.100.0 && < 1.5, time >= 1.2 && < 1.13 -- GitLab