[LTP] [PATCH 2/3] m4: lapi: Drop check for old libcap-devel
Petr Vorel
pvorel@suse.cz
Fri Aug 8 12:55:27 CEST 2025
Upstream fix [1] was released in libcap-2.17 released in 2009.
Even old SLES12 we still use for testing has newer libcap,
we can remove the check.
[1] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=012bca3265ed0d84b57531919a390645052d810e
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
include/lapi/capability.h | 9 ---------
m4/ltp-cap.m4 | 17 +----------------
2 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/include/lapi/capability.h b/include/lapi/capability.h
index 14d2d3c12c..aa791dbeb0 100644
--- a/include/lapi/capability.h
+++ b/include/lapi/capability.h
@@ -10,15 +10,6 @@
#ifdef HAVE_SYS_CAPABILITY_H
# include <sys/capability.h>
-/**
- * Some old libcap-devel(1.96~2.16) define _LINUX_TYPES_H in
- * sys/capability.h that makes ltp-lib cann't include linux/types.h
- * essentially. Here undefine it if include such old header-file.
- */
-# ifndef HAVE_NEWER_LIBCAP
-# undef _LINUX_TYPES_H
-# endif
-#endif
#ifndef CAP_NET_BIND_SERVICE
# define CAP_NET_BIND_SERVICE 10
diff --git a/m4/ltp-cap.m4 b/m4/ltp-cap.m4
index 4981e843da..6b26e7d15c 100644
--- a/m4/ltp-cap.m4
+++ b/m4/ltp-cap.m4
@@ -1,6 +1,6 @@
dnl SPDX-License-Identifier: GPL-2.0-or-later
dnl Copyright (c) Cisco Systems Inc., 2009
-dnl Copyright (c) Linux Test Project, 2019
+dnl Copyright (c) Linux Test Project, 2019-2025
dnl Author: Ngie Cooper <yaneurabeya@gmail.com>
AC_DEFUN([LTP_CHECK_CAPABILITY_SUPPORT],[
@@ -14,19 +14,4 @@ if test "x$cap_libs" != x; then
AC_DEFINE(HAVE_LIBCAP)
fi
AC_SUBST(CAP_LIBS,$cap_libs)
-
-AH_TEMPLATE(HAVE_NEWER_LIBCAP,
-[Define to 1 if you have newer libcap-2 installed.])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <sys/capability.h>
-#include <linux/types.h>
-int main(void) {
- __u16 a;
- __u32 b;
- return 0;
-}])],[has_newer_libcap="yes"])
-
-if test "x$has_newer_libcap" = xyes; then
- AC_DEFINE(HAVE_NEWER_LIBCAP)
-fi
])
--
2.50.1
More information about the ltp
mailing list