gentoo/sys-kernel/scx/files/scx-1.0.14-builtin-preserve-enum-value.patch
Violet Purcell 06d16fb891
sys-kernel/scx: fix building 1.0.14 with GCC
This patch was accidentally clang-specific, as
__builtin_preserve_enum_value takes 2 arguments in clang versus 3 in
GCC.

Closes: https://bugs.gentoo.org/960099
Signed-off-by: Violet Purcell <vimproved@inventati.org>
Part-of: https://github.com/gentoo/gentoo/pull/43008
Closes: https://github.com/gentoo/gentoo/pull/43008
Closes: https://github.com/gentoo/gentoo/pull/43006
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
2025-07-15 08:43:27 +03:00

17 lines
475 B
Diff

This patch is made obsolete by https://github.com/sched-ext/scx/commit/7d9b2cc26473526883297df78e8eee3f2e7b6194.
--- a/lib/scxtest/overrides.h
+++ b/lib/scxtest/overrides.h
@@ -13,7 +13,11 @@
* that we want to get rid of that belongs here.
*/
#define __builtin_preserve_field_info(x,y) 1
+#ifdef __clang__
+#define __builtin_preserve_enum_value(x,y) 1
+#else
#define __builtin_preserve_enum_value(x,y,z) 1
+#endif
#define bpf_addr_space_cast(var, dst_as, src_as)