summaryrefslogtreecommitdiff
path: root/libc/misc/ftw
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-09-18 16:18:25 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-10-08 16:56:33 +0200
commit946b7b5ab8508fa8bf32fdd89d55d9e2f0b4fe25 (patch)
tree1cf74543b8e81168aadbd6f6de386a91a38d604f /libc/misc/ftw
parent3aa8bd943485ae7c3e05bfe4e99ec8daf4cfd2fa (diff)
ftw() is obsolescent in SUSv4
Apps should switch to nftw() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/misc/ftw')
-rw-r--r--libc/misc/ftw/Makefile.in2
-rw-r--r--libc/misc/ftw/ftw.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/libc/misc/ftw/Makefile.in b/libc/misc/ftw/Makefile.in
index 389ad792d..e326d6696 100644
--- a/libc/misc/ftw/Makefile.in
+++ b/libc/misc/ftw/Makefile.in
@@ -18,7 +18,7 @@ MISC_FTW_OUT := $(top_builddir)libc/misc/ftw
MISC_FTW_SRC := $(patsubst %.c,$(MISC_FTW_DIR)/%.c,$(CSRC))
MISC_FTW_OBJ := $(patsubst %.c,$(MISC_FTW_OUT)/%.o,$(CSRC))
-libc-$(UCLIBC_HAS_FTW) += $(MISC_FTW_OBJ)
+libc-$(findstring y,$(UCLIBC_HAS_FTW)$(UCLIBC_HAS_NFTW)) += $(MISC_FTW_OBJ)
objclean-y += misc_ftw_clean
diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c
index 70607fd4e..4a62e388a 100644
--- a/libc/misc/ftw/ftw.c
+++ b/libc/misc/ftw/ftw.c
@@ -752,13 +752,15 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
/* Entry points. */
-
+#if __UCLIBC_HAS_FTW__
int
FTW_NAME (const char *path, FTW_FUNC_T func, int descriptors)
{
return ftw_startup (path, 0, func, descriptors, 0);
}
+#endif
+#if __UCLIBC_HAS_NFTW__
#ifndef _LIBC
int
NFTW_NAME (const char *path, NFTW_FUNC_T func, int descriptors, int flags)
@@ -802,3 +804,4 @@ NFTW_OLD_NAME (const char *path, NFTW_FUNC_T func, int descriptors, int flags)
compat_symbol (libc, NFTW_OLD_NAME, NFTW_NAME, GLIBC_2_1);
#endif
#endif
+#endif