From: Kevin McCarthy Date: Wed, 8 Feb 2017 15:48:07 +0000 (-0800) Subject: Fix build for bdb. X-Git-Tag: mutt-1-8-rel~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b69ef1c359259051327e527c2d2a80c897390c51;p=mutt 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! --- 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);