From 6ccd9d657b33bc6237d8e046ca3b07c803645130 Mon Sep 17 00:00:00 2001 From: Ben Gamari <ben@smart-cactus.org> Date: Tue, 22 Aug 2023 11:09:47 -0400 Subject: [PATCH] base: Don't use Data.ByteString.Internals.memcpy This function is now deprecated from `bytestring`. Use `Foreign.Marshal.Utils.copyBytes` instead. Fixes #23880. --- compiler/GHC/StgToCmm/InfoTableProv.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/GHC/StgToCmm/InfoTableProv.hs b/compiler/GHC/StgToCmm/InfoTableProv.hs index 3375a913d84f..13649becc34e 100644 --- a/compiler/GHC/StgToCmm/InfoTableProv.hs +++ b/compiler/GHC/StgToCmm/InfoTableProv.hs @@ -6,6 +6,7 @@ import Foreign #if defined(HAVE_LIBZSTD) import Foreign.C.Types +import Foreign.Marshal.Utils (copyBytes) import qualified Data.ByteString.Internal as BSI import GHC.IO (unsafePerformIO) #endif @@ -274,7 +275,7 @@ compress clvl (BSI.PS srcForeignPtr off len) = unsafePerformIO $ (srcPtr `plusPtr` off) (fromIntegral len) (fromIntegral clvl) - BSI.create compressedSize $ \p -> BSI.memcpy p dstPtr compressedSize + BSI.create compressedSize $ \p -> copyBytes p dstPtr compressedSize foreign import ccall unsafe "ZSTD_compress" zstd_compress :: -- GitLab