aboutsummaryrefslogtreecommitdiffstats
path: root/main/fakeroot/fix-format.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/fakeroot/fix-format.patch')
-rw-r--r--main/fakeroot/fix-format.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/fakeroot/fix-format.patch b/main/fakeroot/fix-format.patch
new file mode 100644
index 00000000000..8f8639647aa
--- /dev/null
+++ b/main/fakeroot/fix-format.patch
@@ -0,0 +1,25 @@
+Fakeroot defines custom fake_dev_t/fake_ino_t as uint64_t
+but doesn't use the PRIu64 format specifier from inttypes.h
+to print them thereby relying on a specific representation
+of these types.
+
+diff -upr fakeroot-1.27.orig/faked.c fakeroot-1.27/faked.c
+--- fakeroot-1.27.orig/faked.c 2022-01-17 21:37:21.000000000 +0100
++++ fakeroot-1.27/faked.c 2022-01-30 11:36:59.963019225 +0100
+@@ -121,6 +121,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <signal.h>
++#include <inttypes.h>
+ #ifdef HAVE_STDINT_H
+ # include <stdint.h>
+ #endif
+@@ -687,7 +688,7 @@ int load_database(const uint32_t remote)
+ /* */
+ /*********************************/
+ void debug_stat(const struct fakestat *st){
+- fprintf(stderr,"dev:ino=(%llx:%lli), mode=0%lo, own=(%li,%li), nlink=%li, rdev=%lli\n",
++ fprintf(stderr,"dev:ino=(%"PRIx64":%"PRIu64"), mode=0%lo, own=(%li,%li), nlink=%li, rdev=%"PRIu64"\n",
+ st->dev,
+ st->ino,
+ (long)st->mode,