]> granicus.if.org Git - neomutt/commitdiff
Fix build for bdb.
authorKevin McCarthy <kevin@8t8.us>
Wed, 8 Feb 2017 15:48:07 +0000 (07:48 -0800)
committerKevin McCarthy <kevin@8t8.us>
Wed, 8 Feb 2017 15:48:07 +0000 (07:48 -0800)
Changeset fca7e504ab6a removed #else/#endif around two blocks of code
that won't compile with bdb enabled.  Restore those directives.

Thanks to Richard Russon for pointing out the problem and saving me
from having egg all over my face with the 1.8 release!

hcache.c

index 6c73a6add2a5625950b36a3825b8814b849ff7cf..2b73b5b252e52730d88fa78d13248e835fe1edbf 100644 (file)
--- a/hcache.c
+++ b/hcache.c
@@ -841,12 +841,12 @@ mutt_hcache_fetch_raw (header_cache_t *h, const char *filename,
   h->db->get(h->db, NULL, &key, &data, 0);
 
   return data.data;
-#endif
-
+#else
   strncpy(path, h->folder, sizeof (path));
   safe_strcat(path, sizeof (path), filename);
 
   ksize = strlen (h->folder) + keylen (path + strlen (h->folder));  
+#endif
 
 #ifdef HAVE_QDBM
   data = vlget(h->db, path, ksize, NULL);
@@ -943,12 +943,12 @@ mutt_hcache_store_raw (header_cache_t* h, const char* filename, void* data,
   databuf.ulen = dlen;
 
   return h->db->put(h->db, NULL, &key, &databuf, 0);
-#endif
-
+#else
   strncpy(path, h->folder, sizeof (path));
   safe_strcat(path, sizeof (path), filename);
 
   ksize = strlen(h->folder) + keylen(path + strlen(h->folder));
+#endif
 
 #if HAVE_QDBM
   return vlput(h->db, path, ksize, data, dlen, VL_DOVER);