calibre: fix musl build

This commit is contained in:
Duncaen 2025-06-09 17:28:48 +02:00
parent 9321caca0d
commit 537096ccb1
No known key found for this signature in database
GPG key ID: 335C1D17EC3D6E35

View file

@ -0,0 +1,12 @@
Source: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/testing/calibre/musl-pread.patch
--- a/src/calibre/utils/speedup.c
+++ b/src/calibre/utils/speedup.c
@@ -748,7 +748,7 @@
break;
}
#else
-#ifdef __linux__
+#ifdef __GLIBC__
ssize_t nr = pread64(fd, buf + pos, n - pos, offset);
#else
ssize_t nr = pread(fd, buf + pos, n - pos, offset);