diff options
Diffstat (limited to 'winsup/cygwin/libc')
-rw-r--r-- | winsup/cygwin/libc/ftw.c | 5 | ||||
-rw-r--r-- | winsup/cygwin/libc/nftw.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/winsup/cygwin/libc/ftw.c b/winsup/cygwin/libc/ftw.c index 2589e5b4f..9863e1621 100644 --- a/winsup/cygwin/libc/ftw.c +++ b/winsup/cygwin/libc/ftw.c @@ -49,11 +49,16 @@ ftw(const char *path, int (*fn)(const char *, const struct __stat64 *, int), FTS *ftsp; int error = 0, fnflag, sverrno; +#if 0 + /* GLibc allows nfds < 1 and treats it as nfds == 1. Since nfds is + not used in this OpenBSD version anyway, just ignore it for + Linux compatibility. */ /* XXX - nfds is currently unused */ if (nfds < 1 || nfds > OPEN_MAX) { errno = EINVAL; return (-1); } +#endif ftsp = fts_open(paths, FTS_LOGICAL | FTS_COMFOLLOW | FTS_NOCHDIR, NULL); if (ftsp == NULL) diff --git a/winsup/cygwin/libc/nftw.c b/winsup/cygwin/libc/nftw.c index f7c06b29d..bb1c92381 100644 --- a/winsup/cygwin/libc/nftw.c +++ b/winsup/cygwin/libc/nftw.c @@ -50,11 +50,16 @@ nftw(const char *path, int (*fn)(const char *, const struct __stat64 *, int, FTS *ftsp; int error = 0, ftsflags, fnflag, postorder, sverrno; +#if 0 + /* GLibc allows nfds < 1 and treats it as nfds == 1. Since nfds is + not used in this OpenBSD version anyway, just ignore it for + Linux compatibility. */ /* XXX - nfds is currently unused */ if (nfds < 1 || nfds > OPEN_MAX) { errno = EINVAL; return (-1); } +#endif ftsflags = FTS_COMFOLLOW; if (!(ftwflags & FTW_CHDIR)) |