diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-08-10 23:41:24 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-08-10 23:41:24 +0000 |
commit | e8a2a215a7b73924da50b1407f107cfccd4fe979 (patch) | |
tree | 191eaa9f00632ba7c06a2e38aa3bdc7d9d91f45e /src/gdbmreorg.c | |
parent | 19939b60f76d30433a46902523e139869d782ef1 (diff) | |
download | gdbm-e8a2a215a7b73924da50b1407f107cfccd4fe979.tar.gz gdbm-e8a2a215a7b73924da50b1407f107cfccd4fe979.tar.bz2 |
Protect invocations of _gdbm_mapped functions with #if HAVE_MMAP.
Diffstat (limited to 'src/gdbmreorg.c')
-rw-r--r-- | src/gdbmreorg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gdbmreorg.c b/src/gdbmreorg.c index 6bde222..7911857 100644 --- a/src/gdbmreorg.c +++ b/src/gdbmreorg.c @@ -144,7 +144,9 @@ gdbm_reorganize (GDBM_FILE dbf) _gdbm_end_update (new_dbf); gdbm_sync (new_dbf); +#if HAVE_MMAP _gdbm_mapped_unmap (dbf); +#endif /* Move the new file to old name. */ @@ -175,9 +177,11 @@ gdbm_reorganize (GDBM_FILE dbf) free (dbf->bucket_cache); } +#if HAVE_MMAP /* Re-initialize mapping if required */ if (dbf->memory_mapping) _gdbm_mapped_init (dbf); +#endif dbf->desc = new_dbf->desc; dbf->header = new_dbf->header; |