diff --git a/meta-oe/recipes-crypto/leancrypto/files/0001-secure_execution_linux-drop-redundant-linux-prctl.h-.patch b/meta-oe/recipes-crypto/leancrypto/files/0001-secure_execution_linux-drop-redundant-linux-prctl.h-.patch new file mode 100644 index 0000000000..dd6db04c2d --- /dev/null +++ b/meta-oe/recipes-crypto/leancrypto/files/0001-secure_execution_linux-drop-redundant-linux-prctl.h-.patch @@ -0,0 +1,35 @@ +From: Khem Raj +Date: Tue, 29 Sep 2026 02:14:39 +0000 +Subject: [PATCH] secure_execution_linux: drop redundant linux/prctl.h include + + alone already provides everything this file needs +(PR_SET_SPECULATION_CTRL, the PR_SPEC_* constants, and struct +prctl_mm_map on libcs that define it). Do not also include +: musl's defines struct prctl_mm_map +unconditionally, and defines the identical struct with +no compatibility guard against it, so including both is a hard +"redefinition of 'prctl_mm_map'" error. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- +diff --git a/internal/src/secure_execution_linux.c b/internal/src/secure_execution_linux.c +index 7264edf..df57a88 100644 +--- a/internal/src/secure_execution_linux.c ++++ b/internal/src/secure_execution_linux.c +@@ -17,7 +17,14 @@ + * DAMAGE. + */ + +-#include ++/* ++ * alone already provides everything this file needs ++ * (PR_SET_SPECULATION_CTRL, the PR_SPEC_* constants, and on some libcs ++ * struct prctl_mm_map). Do not also include : musl's ++ * defines struct prctl_mm_map unconditionally, and ++ * defines the identical struct with no compatibility ++ * guard against it, so including both is a hard "redefinition" error. ++ */ + #include + + #include "ext_headers_internal.h" diff --git a/meta-oe/recipes-crypto/leancrypto/leancrypto_1.9.0.bb b/meta-oe/recipes-crypto/leancrypto/leancrypto_1.9.0.bb index 566f44fb76..5cd9f02254 100644 --- a/meta-oe/recipes-crypto/leancrypto/leancrypto_1.9.0.bb +++ b/meta-oe/recipes-crypto/leancrypto/leancrypto_1.9.0.bb @@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = " \ SECTION = "libs" SRC_URI = "git://github.com/smuellerDD/leancrypto.git;branch=master;protocol=https;tag=v${PV} \ file://leancrypto-tests.sh \ + file://0001-secure_execution_linux-drop-redundant-linux-prctl.h-.patch \ " SRCREV = "0110b781707c7bdde88482933811387b744d21eb"