* [PATCH] m4: Check for FTW_ACTIONRETVAL along with nftw
@ 2023-03-25 1:28 Khem Raj
2023-03-25 3:45 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2023-03-25 1:28 UTC (permalink / raw)
To: fstests; +Cc: Khem Raj, Darrick J . Wong, Zorro Lang
FTW_ACTIONRETVAL is glibc specific extention which is used to implement
xfsfind but it may not be available on other C library implementations on Linux
e.g. musl. Therefore ensure that these defines are available before declaring
nftw() to be usable
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Darrick J. Wong <djwong@kernel.org>
Cc: Zorro Lang <zlang@redhat.com>
---
m4/package_libcdev.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index b41c087b..7f731044 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -132,7 +132,7 @@ AC_DEFUN([AC_HAVE_NFTW],
#include <stddef.h>
#include <ftw.h>
]], [[
- nftw("/", (int (*)(const char *, const struct stat *, int, struct FTW *))1, 0, 0);
+ nftw("/", (int (*)(const char *, const struct stat *, int, struct FTW *))1, 0, FTW_ACTIONRETVAL);
]])],[have_nftw=yes
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_nftw)
--
2.40.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] m4: Check for FTW_ACTIONRETVAL along with nftw
2023-03-25 1:28 [PATCH] m4: Check for FTW_ACTIONRETVAL along with nftw Khem Raj
@ 2023-03-25 3:45 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2023-03-25 3:45 UTC (permalink / raw)
To: Khem Raj; +Cc: fstests, Zorro Lang
On Fri, Mar 24, 2023 at 06:28:58PM -0700, Khem Raj wrote:
> FTW_ACTIONRETVAL is glibc specific extention which is used to implement
> xfsfind but it may not be available on other C library implementations on Linux
> e.g. musl. Therefore ensure that these defines are available before declaring
> nftw() to be usable
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Darrick J. Wong <djwong@kernel.org>
> Cc: Zorro Lang <zlang@redhat.com>
> ---
> m4/package_libcdev.m4 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
> index b41c087b..7f731044 100644
> --- a/m4/package_libcdev.m4
> +++ b/m4/package_libcdev.m4
> @@ -132,7 +132,7 @@ AC_DEFUN([AC_HAVE_NFTW],
> #include <stddef.h>
> #include <ftw.h>
> ]], [[
> - nftw("/", (int (*)(const char *, const struct stat *, int, struct FTW *))1, 0, 0);
> + nftw("/", (int (*)(const char *, const struct stat *, int, struct FTW *))1, 0, FTW_ACTIONRETVAL);
Seems fine, though xfsfind.c only uses FTW_CONTINUE and FTW_STOP, so
perhaps it'd better to modify the program not to use FTW_ACTIONRETVAL?
OTOH I'm not /that/ keen on using fuzzing xfs from musl so I'll add this
to my backlog and in the meantime
Looks good to me,
Acked-by: Darrick J. Wong <djwong@kernel.org>
--D
> ]])],[have_nftw=yes
> AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
> AC_SUBST(have_nftw)
> --
> 2.40.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-25 3:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-25 1:28 [PATCH] m4: Check for FTW_ACTIONRETVAL along with nftw Khem Raj
2023-03-25 3:45 ` Darrick J. Wong
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 NNTP newsgroup(s).