PAGESIZE used to be defined to getpagesize(); we changed it to a
constant in
b556ef1f, which broke the msync() call.
}
#ifdef MS_SYNC
if (tdb->file->map_ptr) {
}
#ifdef MS_SYNC
if (tdb->file->map_ptr) {
- tdb_off_t moffset = offset & ~(PAGESIZE-1);
+ tdb_off_t moffset = offset & ~(getpagesize()-1);
if (msync(moffset + (char *)tdb->file->map_ptr,
length + (offset - moffset), MS_SYNC) != 0) {
return tdb_logerr(tdb, TDB_ERR_IO, TDB_LOG_ERROR,
if (msync(moffset + (char *)tdb->file->map_ptr,
length + (offset - moffset), MS_SYNC) != 0) {
return tdb_logerr(tdb, TDB_ERR_IO, TDB_LOG_ERROR,