summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 @@
1/* A _very_ skeleton file to demonstrate building tagcache db on host. */ 1/* A _very_ skeleton file to demonstrate building tagcache db on host. */
2 2
3#include <stdio.h> 3#include <stdio.h>
4#include <sys/stat.h>
4#include "tagcache.h" 5#include "tagcache.h"
5 6
6int main(int argc, char **argv) 7int main(int argc, char **argv)
@@ -15,7 +16,8 @@ int main(int argc, char **argv)
15/* stub to avoid including all of apps/misc.c */ 16/* stub to avoid including all of apps/misc.c */
16bool file_exists(const char *file) 17bool file_exists(const char *file)
17{ 18{
18 if (!stat(file)) 19 struct stat s;
20 if (!stat(file, &s))
19 return true; 21 return true;
20 return false; 22 return false;
21} 23}