From: Hemanth.KumarMD@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: Sundeep.Kokkonda@windriver.com, Randy.MacLeod@windriver.com,
Hemanth.KumarMD@windriver.com
Subject: [PATCH v3 6/6] ltp: workaround openat2 build failure with glibc 2.43
Date: Tue, 10 Mar 2026 10:44:03 -0700 [thread overview]
Message-ID: <20260310174403.2309825-6-Hemanth.KumarMD@windriver.com> (raw)
In-Reply-To: <20260310174403.2309825-1-Hemanth.KumarMD@windriver.com>
From: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
glibc 2.43 added native openat2() support, causing LTP's configure to
set HAVE_OPENAT2=1 and skip its own internal definitions, resulting in
a build failure. Add a patch to undef HAVE_OPENAT2 in lapi/openat2.h
as a workaround until a proper fix is found.
Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
---
...tp-fix-build-failure-with-glibc-2.43.patch | 33 +++++++++++++++++++
meta/recipes-extended/ltp/ltp_20260130.bb | 1 +
2 files changed, 34 insertions(+)
create mode 100644 meta/recipes-extended/ltp/ltp/0001-ltp-fix-build-failure-with-glibc-2.43.patch
diff --git a/meta/recipes-extended/ltp/ltp/0001-ltp-fix-build-failure-with-glibc-2.43.patch b/meta/recipes-extended/ltp/ltp/0001-ltp-fix-build-failure-with-glibc-2.43.patch
new file mode 100644
index 0000000000..7c78660e3e
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-ltp-fix-build-failure-with-glibc-2.43.patch
@@ -0,0 +1,33 @@
+ltp: fix build failure with glibc 2.43
+
+glibc 2.43 added native openat2() support for the first time. This
+caused compatibility issues with LTP's internal openat2 definitions
+in lapi/openat2.h. LTP's configure detects glibc's openat2() and
+sets HAVE_OPENAT2=1, causing lapi/openat2.h to skip its own
+definitions of struct open_how, RESOLVE_* constants and the openat2()
+wrapper, resulting in a build failure.
+
+Undef HAVE_OPENAT2 in lapi/openat2.h to force LTP to always use its
+own internal definitions.this is a workaround until the fix is found.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
+
+diff --git a/include/lapi/openat2.h b/include/lapi/openat2.h
+index 03327bdb7..bd44573c9 100644
+--- a/include/lapi/openat2.h
++++ b/include/lapi/openat2.h
+@@ -14,6 +14,11 @@
+
+ #include "config.h"
+
++/* glibc 2.43 provides openat2 but LTP uses its own syscall wrapper */
++#ifdef HAVE_OPENAT2
++#undef HAVE_OPENAT2
++#endif
++
+ #ifndef HAVE_OPENAT2
+ /*
+ * Arguments for how openat2(2) should open the target path. If only @flags and
+
diff --git a/meta/recipes-extended/ltp/ltp_20260130.bb b/meta/recipes-extended/ltp/ltp_20260130.bb
index bb3b7e9ca3..75c5b8b7bd 100644
--- a/meta/recipes-extended/ltp/ltp_20260130.bb
+++ b/meta/recipes-extended/ltp/ltp_20260130.bb
@@ -30,6 +30,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=ht
file://0001-Remove-OOM-tests-from-runtest-mm.patch \
file://0001-Add-__clear_cache-declaration-for-clang.patch \
file://0001-syscalls-semctl08-Skip-semctl08-when-__USE_TIME64_RE.patch \
+ file://0001-ltp-fix-build-failure-with-glibc-2.43.patch \
"
inherit autotools-brokensep pkgconfig
--
2.49.0
next prev parent reply other threads:[~2026-03-10 17:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 17:43 [PATCH v3 1/6] glibc: Upgrade to 2.43 release Hemanth.KumarMD
2026-03-10 17:43 ` [PATCH v3 2/6] gettext: upgrade 0.26 -> 1.0 Hemanth.KumarMD
2026-03-10 17:44 ` [PATCH v3 3/6] gcc-runtime: avoid discarded-qualifiers build failure with glibc 2.43 Hemanth.KumarMD
2026-03-10 17:44 ` [PATCH v3 4/6] libxcrypt: " Hemanth.KumarMD
2026-03-10 17:44 ` [PATCH v3 5/6] barebox-tools: fix " Hemanth.KumarMD
2026-03-10 18:06 ` [OE-core] " Alexander Kanavin
2026-03-12 19:07 ` Randy MacLeod
2026-03-12 19:17 ` Alexander Kanavin
2026-03-13 17:15 ` Ahmad Fatoum
2026-03-17 10:14 ` Hemanth Kumar M D
2026-03-17 12:14 ` Alexander Kanavin
2026-03-10 17:44 ` Hemanth.KumarMD [this message]
2026-03-10 18:05 ` [OE-core] [PATCH v3 6/6] ltp: workaround openat2 " Alexander Kanavin
2026-03-11 13:43 ` [OE-core] [PATCH v3 1/6] glibc: Upgrade to 2.43 release Mathieu Dubois-Briand
2026-03-11 17:43 ` Mathieu Dubois-Briand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260310174403.2309825-6-Hemanth.KumarMD@windriver.com \
--to=hemanth.kumarmd@windriver.com \
--cc=Randy.MacLeod@windriver.com \
--cc=Sundeep.Kokkonda@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox