summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/pidfd/pidfd.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/pidfd/pidfd.h')
-rw-r--r--tools/testing/selftests/pidfd/pidfd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/testing/selftests/pidfd/pidfd.h b/tools/testing/selftests/pidfd/pidfd.h
index cd244d0860ff..f87993def738 100644
--- a/tools/testing/selftests/pidfd/pidfd.h
+++ b/tools/testing/selftests/pidfd/pidfd.h
@@ -16,6 +16,15 @@
#include <sys/types.h>
#include <sys/wait.h>
+/*
+ * Remove the userspace definitions of the following preprocessor symbols
+ * to avoid duplicate-definition warnings from the subsequent in-kernel
+ * definitions.
+ */
+#undef SCHED_NORMAL
+#undef SCHED_FLAG_KEEP_ALL
+#undef SCHED_FLAG_UTIL_CLAMP
+
#include "../kselftest.h"
#include "../clone3/clone3_selftests.h"