summaryrefslogtreecommitdiff
path: root/glob.c
diff options
context:
space:
mode:
authorToby Goodwin <tjg@star.le.ac.uk>2003-08-13 13:51:14 +0100
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:22:10 +0100
commitd884971193ef4934424b77ae862e8b0ecf70bab3 (patch)
tree700b8fd63be483aaa2a737036a3f7833fdf7b26a /glob.c
parent77b18786228a8cf9f58aee09677440c61dc218a9 (diff)
release: rc-1.7.1
Diffstat (limited to 'glob.c')
-rw-r--r--glob.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/glob.c b/glob.c
index ac26203..b472af9 100644
--- a/glob.c
+++ b/glob.c
@@ -1,7 +1,7 @@
/* glob.c: rc's (ugly) globber. This code is not elegant, but it works */
#include "rc.h"
-#include <sys/stat.h>
+#include "stat.h"
/* Lifted from autoconf documentation.*/
#if HAVE_DIRENT_H
@@ -86,7 +86,7 @@ extern List *glob(List *s) {
/* Matches a pattern p against the contents of directory d */
static List *dmatch(char *d, char *p, char *m) {
- bool matched = FALSE;
+ bool matched;
List *top, *r;
static DIR *dirp;
static struct dirent *dp;
@@ -107,7 +107,7 @@ static List *dmatch(char *d, char *p, char *m) {
if (matched) {
char *path = nprint("%s/%s", d, p);
- if (stat(path, &s) < 0)
+ if (lstat(path, &s) < 0)
return NULL;
r = nnew(List);
r->w = ncpy(p);