mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-14 17:59:59 +00:00
kernel-selftest: Fix PTP selftest compilation for kernel 6.7+
The PTP selftest fails to compile with kernel versions 6.7+ due to
missing header definitions for PTP_MASK_CLEAR_ALL and PTP_MASK_EN_SINGLE.
These definitions were introduced in kernel v6.7 with commit c5a445b.
This fix adds kernel headers to CFLAGS during compilation to ensure
the required definitions are available.
Error before fix:
testptp.c:613:31: error: 'PTP_MASK_CLEAR_ALL' undeclared
testptp.c:615:38: error: 'PTP_MASK_EN_SINGLE' undeclared
Fixes: #878
Signed-off-by: Jacob Panov <jacobpanov@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit f30afbe04c)
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
This commit is contained in:
committed by
Gyorgy Sarvari
parent
20af4f6420
commit
85c38da17b
@@ -97,6 +97,12 @@ either install it and add it to HOSTTOOLS, or add clang-native from meta-clang t
|
||||
sed -i -e '/mrecord-mcount/d' ${S}/Makefile
|
||||
sed -i -e '/Wno-alloc-size-larger-than/d' ${S}/Makefile
|
||||
sed -i -e '/Wno-alloc-size-larger-than/d' ${S}/scripts/Makefile.*
|
||||
|
||||
# Add kernel headers to CFLAGS to fix PTP selftest compilation
|
||||
# Required for PTP_MASK_CLEAR_ALL and PTP_MASK_EN_SINGLE definitions
|
||||
# introduced in kernel v6.7 (commit c5a445b)
|
||||
export CFLAGS="${CFLAGS} -I${STAGING_KERNEL_BUILDDIR}/usr/include"
|
||||
|
||||
oe_runmake -C ${S}/tools/testing/selftests TARGETS="${TEST_LIST}"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user