diff --git a/Z-Data.cabal b/Z-Data.cabal
--- a/Z-Data.cabal
+++ b/Z-Data.cabal
@@ -1,6 +1,6 @@
 cabal-version:      2.4
 name:               Z-Data
-version:            1.3.0.0
+version:            1.3.0.1
 synopsis:           Array, vector and text
 description:        This package provides array, slice and text operations
 license:            BSD-3-Clause
diff --git a/Z/Foreign/CPtr.hs b/Z/Foreign/CPtr.hs
--- a/Z/Foreign/CPtr.hs
+++ b/Z/Foreign/CPtr.hs
@@ -118,10 +118,18 @@
 -- so it may be optimized away, 'withCPtrForever' solves that.
 --
 withCPtrForever :: CPtr a -> (Ptr a -> IO b) -> IO b
+#if MIN_VERSION_base(4,15,0)
 {-# INLINABLE withCPtrForever #-}
 withCPtrForever (CPtr pa@(PrimArray ba#)) f = IO $ \ s ->
     case f (indexPrimArray pa 0) of
         IO action# -> keepAlive# ba# s action#
+#else
+{-# NOINLINE withCPtrForever #-}
+withCPtrForever (CPtr pa@(PrimArray ba#)) f = do
+    r <- f (indexPrimArray pa 0)
+    primitive_ (touch# ba#)
+    return r
+#endif
 
 -- | Pass a list of 'CPtr Foo' as @foo**@. USE THIS FUNCTION WITH UNSAFE FFI ONLY!
 withCPtrsUnsafe :: forall a b. [CPtr a] -> (BA# (Ptr a) -> Int -> IO b) -> IO b
