diff --git a/appl/ftp/common/glob.c b/appl/ftp/common/glob.c index 76317c725..05aee60c7 100644 --- a/appl/ftp/common/glob.c +++ b/appl/ftp/common/glob.c @@ -505,8 +505,12 @@ glob1(Char *pattern, glob_t *pglob) * meta characters. */ -#if !defined(S_ISLNK) && defined(S_IFLNK) && defined(S_IFMT) +#ifndef S_ISLNK +#if defined(S_IFLNK) && defined(S_IFMT) #define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) +#else +#define S_ISLNK(mode) 0 +#endif #endif static int diff --git a/lib/roken/glob.c b/lib/roken/glob.c index 76317c725..05aee60c7 100644 --- a/lib/roken/glob.c +++ b/lib/roken/glob.c @@ -505,8 +505,12 @@ glob1(Char *pattern, glob_t *pglob) * meta characters. */ -#if !defined(S_ISLNK) && defined(S_IFLNK) && defined(S_IFMT) +#ifndef S_ISLNK +#if defined(S_IFLNK) && defined(S_IFMT) #define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) +#else +#define S_ISLNK(mode) 0 +#endif #endif static int