printf portability fixes

This commit is contained in:
Evan Miller
2020-08-04 17:24:04 -04:00
parent 8755c26637
commit 446b92b2c8
3 changed files with 16 additions and 10 deletions

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 %jd is beyond EOF\n",(intmax_t)offset);
fprintf(stderr,"offset %lld is beyond EOF\n",(long long)offset);
return 0;
}
lseek(mdb->f->fd, offset, SEEK_SET);