public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Alexey Lapshin <alexey.lapshin@espressif.com>
To: "newlib@sourceware.org" <newlib@sourceware.org>
Cc: Alexey Gerenkov <alexey.gerenkov@espressif.com>,
	Ivan Grokhotkov <ivan@espressif.com>
Subject: [PATCH] newlib: posix: add HAVE_OPENDIR build condition for [n]ftw.c
Date: Thu, 13 Jul 2023 09:52:26 +0000	[thread overview]
Message-ID: <91f7862e8755469f9c412ebdeadbacd818f2fd2a.camel@espressif.com> (raw)

---
 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 18cfc24cb..79e63582c 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 c45cc8f17..17c5bfd1e 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 */
-- 
2.34.1

             reply	other threads:[~2023-07-13  9:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13  9:52 Alexey Lapshin [this message]
2023-07-13 17:59 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91f7862e8755469f9c412ebdeadbacd818f2fd2a.camel@espressif.com \
    --to=alexey.lapshin@espressif.com \
    --cc=alexey.gerenkov@espressif.com \
    --cc=ivan@espressif.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).