aboutsummaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorAlexey Lapshin <alexey.lapshin@espressif.com>2023-07-13 09:52:26 +0000
committerCorinna Vinschen <corinna@vinschen.de>2023-07-13 19:58:29 +0200
commitb7c3a63bb3c4dab861b2bce8793b8dfb36151799 (patch)
treebbb428ef23712ff6a2ff4f656a5bcceb44377892 /newlib
parentc836d26d768b9db1b948ba5dcef571cd356cfb6c (diff)
downloadnewlib-b7c3a63bb3c4dab861b2bce8793b8dfb36151799.zip
newlib-b7c3a63bb3c4dab861b2bce8793b8dfb36151799.tar.gz
newlib-b7c3a63bb3c4dab861b2bce8793b8dfb36151799.tar.bz2
newlib: posix: add HAVE_OPENDIR build condition for [n]ftw.c
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libc/posix/ftw.c3
-rw-r--r--newlib/libc/posix/nftw.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/newlib/libc/posix/ftw.c b/newlib/libc/posix/ftw.c
index 18cfc24..79e6358 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 c45cc8f..17c5bfd 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 */