Signed-off-by: Khem Raj <[email protected]>
---
 ...figure-Fix-checks-for-system-headers.patch | 44 +++++++++++++++++++
 meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb   |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 
meta-oe/recipes-devtools/mcpp/files/0001-configure-Fix-checks-for-system-headers.patch

diff --git 
a/meta-oe/recipes-devtools/mcpp/files/0001-configure-Fix-checks-for-system-headers.patch
 
b/meta-oe/recipes-devtools/mcpp/files/0001-configure-Fix-checks-for-system-headers.patch
new file mode 100644
index 0000000000..d9bdc01ca1
--- /dev/null
+++ 
b/meta-oe/recipes-devtools/mcpp/files/0001-configure-Fix-checks-for-system-headers.patch
@@ -0,0 +1,44 @@
+From c1e9f2f3d086e0df3c10a2468fd7b37fd0c5038c Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 7 Sep 2022 00:02:08 -0700
+Subject: [PATCH] configure: Fix checks for system headers
+
+Define _DEFAULT_SOURCE in system.c so unistd.h can expose readlink API
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 2 +-
+ src/system.c | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index cdf1eba..6fc81e6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -152,7 +152,7 @@ fi
+ 
+ dnl Checks for header files.
+ 
+-AC_CHECK_HEADERS( [unistd.h, stdint.h, inttypes.h])
++AC_CHECK_HEADERS( [unistd.h stdint.h inttypes.h])
+ 
+ dnl Checks for typedefs, and compiler characteristics.
+ 
+diff --git a/src/system.c b/src/system.c
+index 4e008fa..98631a6 100644
+--- a/src/system.c
++++ b/src/system.c
+@@ -36,6 +36,8 @@
+  *      1. specify the constants in "configed.H" or "noconfig.H",
+  *      2. append the system-dependent routines in this file.
+  */
++
++#define _DEFAULT_SOURCE
+ #if PREPROCESSED
+ #include    "mcpp.H"
+ #else
+-- 
+2.37.3
+
diff --git a/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb 
b/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb
index f8125f72d9..9445856730 100644
--- a/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb
+++ b/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=5ca370b75ec890321888a00cea9bc1d5"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
            file://ice-mcpp.patch \
+           file://0001-configure-Fix-checks-for-system-headers.patch \
            file://CVE-2019-14274.patch"
 SRC_URI[md5sum] = "512de48c87ab023a69250edc7a0c7b05"
 SRC_URI[sha256sum] = 
"3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864"
-- 
2.37.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#98704): 
https://lists.openembedded.org/g/openembedded-devel/message/98704
Mute This Topic: https://lists.openembedded.org/mt/93537571/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to