You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fakeroot/fakeroot-1.18.4-inttypes.patch

57 lines
2.1 KiB

diff --git a/faked.c b/faked.c
index 1b12b1c..fa629a3 100644
--- a/faked.c
+++ b/faked.c
@@ -122,7 +122,7 @@
#ifdef FAKEROOT_DB_PATH
# include <dirent.h>
#endif
-
+#include <inttypes.h>
#ifndef FAKEROOT_FAKENET
# define FAKE_KEY msg_key
#else /* FAKEROOT_FAKENET */
@@ -518,10 +518,10 @@ int save_database(const uint32_t remote)
(uint64_t) i->buf.mode,(uint64_t) i->buf.uid,(uint64_t) i->buf.gid,
(uint64_t) i->buf.nlink,(uint64_t) i->buf.rdev,path);
#else
- fprintf(f,"dev=%llx,ino=%llu,mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu\n",
- (uint64_t) i->buf.dev,(uint64_t) i->buf.ino,(uint64_t) i->buf.mode,
- (uint64_t) i->buf.uid,(uint64_t) i->buf.gid,(uint64_t) i->buf.nlink,
- (uint64_t) i->buf.rdev);
+ fprintf(f,"dev=%" PRIx64 ",ino=%" PRIu64 ",mode=%" PRIo32 ",uid=%" PRIu32 ",gid=%" PRIu32 ",nlink=%" PRIu32",rdev=%" PRIu64 "\n",
+ i->buf.dev, i->buf.ino, i->buf.mode,
+ i->buf.uid, i->buf.gid, i->buf.nlink,
+ i->buf.rdev);
#endif
}
@@ -559,7 +559,7 @@ int load_database(const uint32_t remote)
stdev = path_st.st_dev;
stino = path_st.st_ino;
#else
- r=scanf("dev=%llx,ino=%llu,mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu\n",
+ r=scanf("dev=%" PRIx64 ",ino=%" PRIu64 ",mode=%" PRIo64 ",uid=%" PRIu64 ",gid=%"PRIu64 ",nlink=%" PRIu64 ",rdev=%" PRIu64 "\n",
&stdev, &stino, &stmode, &stuid, &stgid, &stnlink, &strdev);
if (r != 7)
break;
@@ -586,13 +586,13 @@ 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 ":%" PRIx64 "), mode=0%" PRIo32 ", own=(%" PRIi32 ",%" PRIi32 "), nlink=%" PRIi32 ", rdev=%" PRIi64 "\n",
st->dev,
st->ino,
- (long)st->mode,
- (long)st->uid,
- (long)st->gid,
- (long)st->nlink,
+ st->mode,
+ st->uid,
+ st->gid,
+ st->nlink,
st->rdev);
}