diff --git a/appl/ftp/common/glob.c b/appl/ftp/common/glob.c index c1ad6762c..1b4d51585 100644 --- a/appl/ftp/common/glob.c +++ b/appl/ftp/common/glob.c @@ -494,6 +494,11 @@ glob1(Char *pattern, glob_t *pglob) * of recursion for each segment in the pattern that contains one or more * meta characters. */ + +#if !defined(S_ISLNK) && defined(S_IFLNK) && defined(S_IFMT) +#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) +#endif + static int glob2(Char *pathbuf, Char *pathend, Char *pattern, glob_t *pglob) { diff --git a/lib/roken/glob.c b/lib/roken/glob.c index c1ad6762c..1b4d51585 100644 --- a/lib/roken/glob.c +++ b/lib/roken/glob.c @@ -494,6 +494,11 @@ glob1(Char *pattern, glob_t *pglob) * of recursion for each segment in the pattern that contains one or more * meta characters. */ + +#if !defined(S_ISLNK) && defined(S_IFLNK) && defined(S_IFMT) +#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) +#endif + static int glob2(Char *pathbuf, Char *pathend, Char *pattern, glob_t *pglob) {