[LTP] [RFC PATCH v2 6/7] m4: Remove check for clone() supports 7 args
Petr Vorel
pvorel@suse.cz
Wed Jan 26 13:35:46 CET 2022
Fix from 1db62666ce (2014) for SLES10, RHEL4. Save to remove now.
NOTE: support for 7 args was missing in kernel 2.4 and earlier.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
New in v2
configure.ac | 1 -
lib/cloner.c | 10 ----------
m4/ltp-clone7args.m4 | 17 -----------------
3 files changed, 28 deletions(-)
delete mode 100644 m4/ltp-clone7args.m4
diff --git a/configure.ac b/configure.ac
index 41c385edcb..f83bbe950b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -352,7 +352,6 @@ LTP_CHECK_ATOMIC_MEMORY_MODEL
LTP_CHECK_BUILTIN_CLEAR_CACHE
LTP_CHECK_CAPABILITY_SUPPORT
LTP_CHECK_CC_WARN_OLDSTYLE
-LTP_CHECK_CLONE_SUPPORTS_7_ARGS
LTP_CHECK_CRYPTO
LTP_CHECK_FORTIFY_SOURCE
LTP_CHECK_KERNEL_DEVEL
diff --git a/lib/cloner.c b/lib/cloner.c
index 11401f2303..95954f6df3 100644
--- a/lib/cloner.c
+++ b/lib/cloner.c
@@ -50,11 +50,6 @@ extern int __clone2(int (*fn) (void *arg), void *child_stack_base,
pid_t *parent_tid, void *tls, pid_t *child_tid);
#endif
-#ifndef CLONE_SUPPORTS_7_ARGS
-# define clone(fn, stack, flags, arg, ptid, tls, ctid) \
- clone(fn, stack, flags, arg)
-#endif
-
/*
* ltp_clone: wrapper for clone to hide the architecture dependencies.
* 1. hppa takes bottom of stack and no stacksize (stack grows up)
@@ -109,12 +104,7 @@ int ltp_clone7(unsigned long flags, int (*fn)(void *arg), void *arg,
ctid = va_arg(arg_clone, pid_t *);
va_end(arg_clone);
-#ifdef CLONE_SUPPORTS_7_ARGS
return ltp_clone_(flags, fn, arg, stack_size, stack, ptid, tls, ctid);
-#else
- errno = ENOSYS;
- return -1;
-#endif
}
/*
diff --git a/m4/ltp-clone7args.m4 b/m4/ltp-clone7args.m4
deleted file mode 100644
index ab55c1e335..0000000000
--- a/m4/ltp-clone7args.m4
+++ /dev/null
@@ -1,17 +0,0 @@
-dnl SPDX-License-Identifier: GPL-2.0-or-later
-dnl Copyright (c) Linux Test Project, 2014
-
-AC_DEFUN([LTP_CHECK_CLONE_SUPPORTS_7_ARGS],[
-AH_TEMPLATE(CLONE_SUPPORTS_7_ARGS,
-[Define to 1 if clone() supports 7 arguments.])
-AC_MSG_CHECKING([if clone() supports 7 args])
-AC_TRY_LINK([#define _GNU_SOURCE
- #include <sched.h>
- #include <stdlib.h>],
- [
- #ifndef __ia64__
- clone(NULL, NULL, 0, NULL, NULL, NULL, NULL);
- #endif
- ],
- AC_DEFINE(CLONE_SUPPORTS_7_ARGS) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
-])
--
2.34.1
More information about the ltp
mailing list