@@ -7,6 +7,7 @@ SRC_URI += "file://OEToolchainConfig.cmake \
file://environment.d-cmake.sh \
file://0001-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal.patch \
file://0002-CMakeLists.txt-disable-USE_NGHTTP2.patch \
+ file://0003-Disable-libidn2-in-bundled-curl.patch \
"
LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause & curl"
new file mode 100644
@@ -0,0 +1,26 @@
+From 7c6b3d07d8087cae729ba7d82602f50b82086e39 Mon Sep 17 00:00:00 2001
+From: Deepak Rathore <deeratho@cisco.com>
+Date: Mon, 10 Feb 2026 00:00:00 +0000
+Subject: [PATCH] cmcurl: disable libidn2 for native build
+
+CMake's bundled curl forces USE_LIBIDN2 to ON, which makes the build include
+<idn2.h>. The native sysroot does not provide that header, so the build fails
+and we end up with a native dependency loop. Allow the option to be overridden
+and default it to OFF when it is not preset.
+
+Upstream-Status: Inappropriate [native-only configuration]
+
+Signed-off-by: Deepak Rathore <deeratho@cisco.com>
+---
+ Utilities/cmcurl/CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
+index ab5f1c50c6..c1fb0e3e6d 100644
+--- a/Utilities/cmcurl/CMakeLists.txt
++++ b/Utilities/cmcurl/CMakeLists.txt
+@@ -105,1 +105,3 @@
+-set(USE_LIBIDN2 ON)
++if(NOT DEFINED USE_LIBIDN2)
++ set(USE_LIBIDN2 OFF)
++endif()