summaryrefslogtreecommitdiffstats
path: root/tools/database/database.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/database/database.c')
-rw-r--r--tools/database/database.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/database/database.c b/tools/database/database.c
index a8be48ab4b..1f398c02f0 100644
--- a/tools/database/database.c
+++ b/tools/database/database.c
@@ -1,6 +1,7 @@
/* A _very_ skeleton file to demonstrate building tagcache db on host. */
#include <stdio.h>
+#include <sys/stat.h>
#include "tagcache.h"
int main(int argc, char **argv)
@@ -15,7 +16,8 @@ int main(int argc, char **argv)
/* stub to avoid including all of apps/misc.c */
bool file_exists(const char *file)
{
- if (!stat(file))
+ struct stat s;
+ if (!stat(file, &s))
return true;
return false;
}