summaryrefslogtreecommitdiff
path: root/glob
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1995-12-12 02:50:12 +0000
committerRoland McGrath <roland@redhat.com>1995-12-12 02:50:12 +0000
commit41e6704efd71ee4735685baa67c61e14642d9779 (patch)
treecb9f6c6c875e30cdfd50fa09c8cb1d670275626c /glob
parentffea662953c33653f1da482a1fb3fe715b3487df (diff)
downloadgunmake-41e6704efd71ee4735685baa67c61e14642d9779.tar.gz
Updated from libc
Diffstat (limited to 'glob')
-rw-r--r--glob/glob.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/glob/glob.c b/glob/glob.c
index ce17fe1..e212576 100644
--- a/glob/glob.c
+++ b/glob/glob.c
@@ -106,6 +106,8 @@ extern int errno;
#define ANSI_STRING
#else /* No standard headers. */
+extern char *getenv ();
+
#ifdef HAVE_STRING_H
#include <string.h>
#define ANSI_STRING
@@ -496,7 +498,8 @@ glob (pattern, flags, errfunc, pglob)
struct stat st;
for (i = oldcount; i < pglob->gl_pathc; ++i)
if (((flags & GLOB_ALTDIRFUNC) ?
- *pglob->gl_stat : __stat) (pglob->gl_pathv[i], &st) == 0 &&
+ (*pglob->gl_stat) (pglob->gl_pathv[i], &st) :
+ __stat (pglob->gl_pathv[i], &st)) == 0 &&
S_ISDIR (st.st_mode))
{
size_t len = strlen (pglob->gl_pathv[i]) + 2;