Fix warnings and errors from 7373cf5

dircache.h has to be included no matter what.

Change-Id: Ib9ae4277615e8573b931d42fc6f1b3681d898bca
This commit is contained in:
Michael Sevakis 2017-02-10 05:44:04 -05:00
parent 7373cf518f
commit a4dc244b4e

View file

@ -82,9 +82,7 @@
#include "pathfuncs.h" #include "pathfuncs.h"
#include "structec.h" #include "structec.h"
#include "debug.h" #include "debug.h"
#ifdef HAVE_DIRCACHE
#include "dircache.h" #include "dircache.h"
#endif
#ifndef __PCTOOL__ #ifndef __PCTOOL__
#include "lang.h" #include "lang.h"
@ -768,7 +766,7 @@ static bool open_files(struct tagcache_search *tcs, int tag)
return true; return true;
} }
static bool retrieve(struct tagcache_search *tcs, int idx_id, static bool retrieve(struct tagcache_search *tcs, IF_DIRCACHE(int idx_id,)
struct index_entry *idx, int tag, char *buf, long size) struct index_entry *idx, int tag, char *buf, long size)
{ {
struct tagfile_entry tfe; struct tagfile_entry tfe;
@ -1087,8 +1085,8 @@ static bool check_clauses(struct tagcache_search *tcs,
if (clause->tag == tag_filename if (clause->tag == tag_filename
|| clause->tag == tag_virt_basename) || clause->tag == tag_virt_basename)
{ {
retrieve(tcs, tcs->idx_id, idx, tag_filename, buf, retrieve(tcs, IF_DIRCACHE(tcs->idx_id,) idx, tag_filename,
sizeof buf); buf, sizeof buf);
} }
else else
{ {
@ -1661,7 +1659,7 @@ bool tagcache_retrieve(struct tagcache_search *tcs, int idxid,
if (!get_index(tcs->masterfd, idxid, &idx, true)) if (!get_index(tcs->masterfd, idxid, &idx, true))
return false; return false;
return retrieve(tcs, idxid, &idx, tag, buf, size); return retrieve(tcs, IF_DIRCACHE(idxid,) &idx, tag, buf, size);
} }
static bool update_master_header(void) static bool update_master_header(void)