summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/mcpp
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-09-07 00:06:00 -0700
committerKhem Raj <raj.khem@gmail.com>2022-09-07 16:44:54 -0700
commit6721430ca97aa98208cc1c450e4e8c4c274ca840 (patch)
treee54bad0780f7d2beca0e6907d2f6dee965d46a1e /meta-oe/recipes-devtools/mcpp
parente97edfd764a3382c8ac53550ed54898d7cc27198 (diff)
downloadmeta-openembedded-6721430ca97aa98208cc1c450e4e8c4c274ca840.tar.gz
mcpp: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/mcpp')
-rw-r--r--meta-oe/recipes-devtools/mcpp/files/0001-configure-Fix-checks-for-system-headers.patch44
-rw-r--r--meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb1
2 files changed, 45 insertions, 0 deletions
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 @@
1From c1e9f2f3d086e0df3c10a2468fd7b37fd0c5038c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 7 Sep 2022 00:02:08 -0700
4Subject: [PATCH] configure: Fix checks for system headers
5
6Define _DEFAULT_SOURCE in system.c so unistd.h can expose readlink API
7
8Upstream-Status: Pending
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 configure.ac | 2 +-
13 src/system.c | 2 ++
14 2 files changed, 3 insertions(+), 1 deletion(-)
15
16diff --git a/configure.ac b/configure.ac
17index cdf1eba..6fc81e6 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -152,7 +152,7 @@ fi
21
22 dnl Checks for header files.
23
24-AC_CHECK_HEADERS( [unistd.h, stdint.h, inttypes.h])
25+AC_CHECK_HEADERS( [unistd.h stdint.h inttypes.h])
26
27 dnl Checks for typedefs, and compiler characteristics.
28
29diff --git a/src/system.c b/src/system.c
30index 4e008fa..98631a6 100644
31--- a/src/system.c
32+++ b/src/system.c
33@@ -36,6 +36,8 @@
34 * 1. specify the constants in "configed.H" or "noconfig.H",
35 * 2. append the system-dependent routines in this file.
36 */
37+
38+#define _DEFAULT_SOURCE
39 #if PREPROCESSED
40 #include "mcpp.H"
41 #else
42--
432.37.3
44
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"
5 5
6SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ 6SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
7 file://ice-mcpp.patch \ 7 file://ice-mcpp.patch \
8 file://0001-configure-Fix-checks-for-system-headers.patch \
8 file://CVE-2019-14274.patch" 9 file://CVE-2019-14274.patch"
9SRC_URI[md5sum] = "512de48c87ab023a69250edc7a0c7b05" 10SRC_URI[md5sum] = "512de48c87ab023a69250edc7a0c7b05"
10SRC_URI[sha256sum] = "3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864" 11SRC_URI[sha256sum] = "3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864"