mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-02 00:18:15 +02:00
19 lines
646 B
Diff
19 lines
646 B
Diff
|
calling the syscall directly for renameat2 breaks fakeroot.
|
||
|
Force fallback til musl has implemented renameat2.
|
||
|
|
||
|
ref: https://gitlab.alpinelinux.org/alpine/aports/-/issues/16016
|
||
|
|
||
|
diff --git a/lib/renameatu.c b/lib/renameatu.c
|
||
|
index 6893232..a6b278d 100644
|
||
|
--- a/lib/renameatu.c
|
||
|
+++ b/lib/renameatu.c
|
||
|
@@ -109,7 +109,7 @@ renameatu (int fd1, char const *src, int fd2, char const *dst,
|
||
|
#ifdef HAVE_RENAMEAT2
|
||
|
ret_val = renameat2 (fd1, src, fd2, dst, flags);
|
||
|
err = errno;
|
||
|
-#elif defined SYS_renameat2
|
||
|
+#elif defined SYS_renameat2 && defined BREAK_FAKEROOT
|
||
|
ret_val = syscall (SYS_renameat2, fd1, src, fd2, dst, flags);
|
||
|
err = errno;
|
||
|
#endif
|