]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
m4: Check for FTW_ACTIONRETVAL along with nftw
authorKhem Raj <raj.khem@gmail.com>
Sat, 25 Mar 2023 01:28:58 +0000 (18:28 -0700)
committerZorro Lang <zlang@kernel.org>
Sat, 25 Mar 2023 04:38:44 +0000 (12:38 +0800)
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>
Acked-by: Darrick J. Wong <djwong@kernel.org>
m4/package_libcdev.m4

index b41c087bfb811ee60d8484990f85e4f6654eec53..7f7310440507af10bc9f34161db951871194e055 100644 (file)
@@ -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)