From b69ef1c359259051327e527c2d2a80c897390c51 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Wed, 8 Feb 2017 07:48:07 -0800 Subject: [PATCH] Fix build for bdb. 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hcache.c b/hcache.c index 6c73a6ad..2b73b5b2 100644 --- 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); -- 2.50.1