* [PATCH] newlib: posix: add HAVE_OPENDIR build condition for [n]ftw.c
@ 2023-07-13 9:52 Alexey Lapshin
2023-07-13 17:59 ` Corinna Vinschen
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Lapshin @ 2023-07-13 9:52 UTC (permalink / raw)
To: newlib; +Cc: Alexey Gerenkov, Ivan Grokhotkov
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] newlib: posix: add HAVE_OPENDIR build condition for [n]ftw.c
2023-07-13 9:52 [PATCH] newlib: posix: add HAVE_OPENDIR build condition for [n]ftw.c Alexey Lapshin
@ 2023-07-13 17:59 ` Corinna Vinschen
0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2023-07-13 17:59 UTC (permalink / raw)
To: newlib
On Jul 13 09:52, Alexey Lapshin wrote:
> ---
> 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
Pushed.
Thanks,
Corinna
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-13 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-13 9:52 [PATCH] newlib: posix: add HAVE_OPENDIR build condition for [n]ftw.c Alexey Lapshin
2023-07-13 17:59 ` Corinna Vinschen
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).