From 0c402e1c84b7148a431d754fbeb4a8d16627ee44 Mon Sep 17 00:00:00 2001 From: PaulRivier <36163765+PaulRivier@users.noreply.github.com> Date: Fri, 2 Oct 2026 15:39:50 +0200 Subject: [PATCH] FFI sendfile64 -> sendfile sendfile64 does not exist on Alpine/MUSL, it exists as "sendfile" and is 64b by default This fix is necessary to build this package on Alpine/musl. Full compatibility with glibc 32b may require preprocessor conditionals that are not included in this minimal fix --- src/Network/Socket/SendFile/Linux.hsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Network/Socket/SendFile/Linux.hsc b/src/Network/Socket/SendFile/Linux.hsc index f91498d..bceb632 100644 --- a/src/Network/Socket/SendFile/Linux.hsc +++ b/src/Network/Socket/SendFile/Linux.hsc @@ -79,6 +79,6 @@ maxBytes :: Int64 maxBytes = fromIntegral (maxBound :: (#type ssize_t)) -- sendfile64 gives LFS support -foreign import ccall unsafe "sendfile64" c_sendfile +foreign import ccall unsafe "sendfile" c_sendfile :: Fd -> Fd -> Ptr (#type off64_t) -> (#type size_t) -> IO (#type ssize_t)