cpuset: Detect missing fts.h
PATCH 1/1 cpuset: Detect missing fts.h
This fixes build on uClibc with disabled fts.h support and MUSL, which does not have fts.h at all.
--- configure.ac | 1 + include/mk/config.mk.in | 1 + m4/ltp-fts.m4 | 7 +++++++ testcases/kernel/controllers/Makefile | 4 ++++ 4 files changed, 13 insertions(+) create mode 100644 m4/ltp-fts.m4
configure.ac +1 -0
@@ -235,6 +235,7 @@ LTP_DETECT_HOST_CPU LTP_CHECK_PERF_EVENT LTP_CHECK_SYNCFS LTP_CHECK_SYNC_FILE_RANGE +LTP_CHECK_FTS_H if test "x$with_numa" = xyes; then LTP_CHECK_SYSCALL_NUMA
include/mk/config.mk.in +1 -0
@@ -46,6 +46,7 @@ SELINUX_LIBS := @SELINUX_LIBS@ TIRPC_CPPFLAGS := @TIRPC_CPPFLAGS@ TIRPC_LIBS := @TIRPC_LIBS@ KEYUTILS_LIBS := @KEYUTILS_LIBS@ +HAVE_FTS_H := @HAVE_FTS_H@ prefix := @prefix@
m4/ltp-fts.m4 new file +7 -0
@@ -0,0 +1,7 @@ +dnl SPDX-License-Identifier: GPL-2.0-or-later +dnl Copyright (c) 2019 Petr Vorel <[email protected]> + +AC_DEFUN([LTP_CHECK_FTS_H],[ + AC_CHECK_HEADERS(fts.h, [have_fts=1]) + AC_SUBST(HAVE_FTS_H, $have_fts) +])
testcases/kernel/controllers/Makefile +4 -0
@@ -29,6 +29,10 @@ LIBDIR := libcontrollers LIB := $(LIBDIR)/libcontrollers.a FILTER_OUT_DIRS := $(LIBDIR) +ifneq ($(HAVE_FTS_H),1) + FILTER_OUT_DIRS += cpuset +endif + $(LIBDIR): mkdir -p "$@"
Signature · 1 line
2.21.0
PATCH 1/1 cpuset: Detect missing fts.h
Hi!
configure.ac LTP_DETECT_HOST_CPU · line 238
Quoted 9 lines
configure.ac +1
-0@@ -235,6 +235,7 @@ LTP_DETECT_HOST_CPU LTP_CHECK_PERF_EVENT LTP_CHECK_SYNCFS LTP_CHECK_SYNC_FILE_RANGE +LTP_CHECK_FTS_H
Any reason why we couldn't simply put the fts.h at the end of the AC_CHECK_HEADERS() list in configure.ac?
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 cpuset: Detect missing fts.h
Hi Cyril,
Quoted 4 lines
Quoted 4 lines
configure.ac +0
-0
Quoted 8 lines
configure.ac LTP_DETECT_HOST_CPU · line 238
Quoted 5 lines
configure.ac +1
-0@@ -235,6 +235,7 @@ LTP_DETECT_HOST_CPU LTP_CHECK_PERF_EVENT LTP_CHECK_SYNCFS LTP_CHECK_SYNC_FILE_RANGE +LTP_CHECK_FTS_HAny reason why we couldn't simply put the
fts.hat the end of theAC_CHECK_HEADERS()list in configure.ac?
Yes, without AC_SUBST the result is not visible to make (it's just in config.h). Or am I wrong? That was the reason, why I didn't take [1] this patch [2].
Anyway, I'm sorry, I thought it's simple enough not to be reviewed, but next time I'll send it to ML.
Kind regards,
Petr
[1] http://lists.linux.it/pipermail/ltp/2019-March/011428.html
[2] https://patchwork.ozlabs.org/patch/1058067/
PATCH 1/1 cpuset: Detect missing fts.h
Hi!
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
configure.ac +0
-0Quoted 8 lines
configure.ac LTP_DETECT_HOST_CPU · line 238
Quoted 5 lines
configure.ac +1
-0@@ -235,6 +235,7 @@ LTP_DETECT_HOST_CPU LTP_CHECK_PERF_EVENT LTP_CHECK_SYNCFS LTP_CHECK_SYNC_FILE_RANGE +LTP_CHECK_FTS_HAny reason why we couldn't simply put the
fts.hat the end of theAC_CHECK_HEADERS()list in configure.ac?
Quoted 2 lines
Yes, without
AC_SUBSTthe result is not visible to make (it's just inconfig.h). Or am I wrong? That was the reason, why I didn't take [1] this patch [2].
Ah, my bad, we need AC_SUBST() in this case, I guess that this couldn't be done simpler then.
Signature · 2 lines
Cyril Hrubis [email protected]