Signed-off-by: Khem Raj <[email protected]>
---
 ...lude-bits-stdc-.h-only-when-using-libstdc.patch | 37 ++++++++++++++++++++++
 .../cannelloni/cannelloni_1.1.0.bb                 |  4 ++-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git 
a/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-include-bits-stdc-.h-only-when-using-libstdc.patch
 
b/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-include-bits-stdc-.h-only-when-using-libstdc.patch
new file mode 100644
index 0000000000..71f447c94b
--- /dev/null
+++ 
b/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-include-bits-stdc-.h-only-when-using-libstdc.patch
@@ -0,0 +1,37 @@
+From 7aed36765ae44b41ede7e139da0a11b3696f2e06 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 13 Nov 2023 00:07:23 -0800
+Subject: [PATCH] include bits/stdc++.h only when using libstdc++
+
+We have other c++ runtime implementations e.g. llvm's libc++ which does
+not provide this header bits/stdc++.h, therefore make sure that this
+header is only included when using libstdc++
+
+Fixes
+| 
/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/cannelloni/1.1.0/git/tcpthread.cpp:27:10:
 fatal error: 'bits/stdc++.h' file not found
+|    27 | #include <bits/stdc++.h>
+|       |          ^~~~~~~~~~~~~~~
+
+Upstream-Status: Submitted [https://github.com/mguentner/cannelloni/pull/56]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tcpthread.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tcpthread.cpp b/tcpthread.cpp
+index a1b3047..bb5a7b2 100644
+--- a/tcpthread.cpp
++++ b/tcpthread.cpp
+@@ -24,7 +24,9 @@
+ #include <cstdint>
+ #include <cstdio>
+ 
++#ifdef __GLIBCXX__
+ #include <bits/stdc++.h>
++#endif
+ 
+ #include <linux/can.h>
+ #include <string.h>
+-- 
+2.42.1
+
diff --git 
a/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb 
b/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb
index fb457dc03b..dfa7437ba8 100644
--- a/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb
+++ b/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb
@@ -2,7 +2,9 @@ SUMMARY = "a SocketCAN over Ethernet tunnel"
 HOMEPAGE = "https://github.com/mguentner/cannelloni";
 LICENSE = "GPL-2.0-only"
 
-SRC_URI = 
"git://github.com/mguentner/cannelloni.git;protocol=https;branch=master"
+SRC_URI = 
"git://github.com/mguentner/cannelloni.git;protocol=https;branch=master \
+           file://0001-include-bits-stdc-.h-only-when-using-libstdc.patch \
+          "
 SRCREV = "3d4fb8c8b07f6d7c62b2bdad7e5a94de61c9a29b"
 
 LIC_FILES_CHKSUM = "file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"

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

Reply via email to