[newlib-cygwin/main] newlib: posix: add HAVE_OPENDIR build condition for [n]ftw.c

Corinna Vinschen corinna@sourceware.org
Thu Jul 13 17:58:56 GMT 2023


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b7c3a63bb3c4dab861b2bce8793b8dfb36151799

commit b7c3a63bb3c4dab861b2bce8793b8dfb36151799
Author:     Alexey Lapshin <alexey.lapshin@espressif.com>
AuthorDate: Thu Jul 13 09:52:26 2023 +0000
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Thu Jul 13 19:58:29 2023 +0200

    newlib: posix: add HAVE_OPENDIR build condition for [n]ftw.c

Diff:
---
 newlib/libc/posix/ftw.c  | 3 +++
 newlib/libc/posix/nftw.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/newlib/libc/posix/ftw.c b/newlib/libc/posix/ftw.c
index 18cfc24cbf1e..79e63582ce7d 100644
--- a/newlib/libc/posix/ftw.c
+++ b/newlib/libc/posix/ftw.c
@@ -1,3 +1,5 @@
+#ifndef HAVE_OPENDIR
+
 /*
 * Copyright © 2005-2020 Rich Felker, et al.
 *
@@ -31,3 +33,4 @@ int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), int
 	return nftw(path, (int (*)())fn, fd_limit, FTW_PHYS);
 }
 
+#endif /* ! HAVE_OPENDIR */
diff --git a/newlib/libc/posix/nftw.c b/newlib/libc/posix/nftw.c
index c45cc8f17208..17c5bfd1e3aa 100644
--- a/newlib/libc/posix/nftw.c
+++ b/newlib/libc/posix/nftw.c
@@ -1,3 +1,5 @@
+#ifndef HAVE_OPENDIR
+
 /*
 * Copyright © 2005-2020 Rich Felker, et al.
 *
@@ -154,3 +156,4 @@ int nftw(const char *path, int (*fn)(const char *, const struct stat *, int, str
 	return r;
 }
 
+#endif /* ! HAVE_OPENDIR */


More information about the Newlib-cvs mailing list