More printf portability fixes

This commit is contained in:
Evan Miller 2020-08-04 17:34:54 -04:00
parent 446b92b2c8
commit 9941cb2927
2 changed files with 2 additions and 2 deletions

View File

@ -372,7 +372,7 @@ static ssize_t _mdb_read_pg(MdbHandle *mdb, void *pg_buf, unsigned long pg)
fstat(mdb->f->fd, &status);
if (status.st_size < offset) {
fprintf(stderr,"offset %lld is beyond EOF\n",(long long)offset);
fprintf(stderr,"offset %" PRIu64 " is beyond EOF\n",(uint64_t)offset);
return 0;
}
if (mdb->stats && mdb->stats->collect)

View File

@ -81,7 +81,7 @@ mdb_write_pg(MdbHandle *mdb, unsigned long pg)
fstat(mdb->f->fd, &status);
/* is page beyond current size + 1 ? */
if (status.st_size < offset + mdb->fmt->pg_size) {
fprintf(stderr,"offset %lld is beyond EOF\n",(long long)offset);
fprintf(stderr,"offset %" PRIu64 " is beyond EOF\n",(uint64_t)offset);
return 0;
}
lseek(mdb->f->fd, offset, SEEK_SET);