aports/main/ccache/ioctl.patch
2024-01-02 08:32:25 +00:00

19 lines
548 B
Diff

musl uses an `int` instead of a `unsigend long` for the ioctl function
prototype, contrary to glibc, since POSIX mandates the former. This
causes a spurious error on ppc64le which can be silenced by casting to
int explicitly.
See https://www.openwall.com/lists/musl/2020/01/20/2
--- a/src/storage/local/LocalStorage.cpp
+++ b/src/storage/local/LocalStorage.cpp
@@ -263,7 +263,7 @@
}
}
- if (ioctl(*dest_fd, FICLONE, *src_fd) != 0) {
+ if (ioctl(*dest_fd, (int)FICLONE, *src_fd) != 0) {
throw core::Error(strerror(errno));
}