Skip to contentSkip to conversation

libfdt: add extern "C" for C++

PATCH Applied [email protected] 2 participants 2 messages Jun 16, 2020 – Jun 18, 2020 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libfdt: add extern "C" for C++

From: Patrick Oppenlander <[email protected]>

---
 libfdt/libfdt.h | 8 ++++++++
 1 file changed, 8 insertions(+)
libfdt/libfdt.h +8 -0
index 48f375c..544d3ef 100644
@@ -9,6 +9,10 @@
 #include <libfdt_env.h>
 #include <fdt.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define FDT_FIRST_SUPPORTED_VERSION	0x02
 #define FDT_LAST_SUPPORTED_VERSION	0x11
 
@@ -2069,4 +2073,8 @@ int fdt_overlay_apply(void *fdt, void *fdto);
 
 const char *fdt_strerror(int errval);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LIBFDT_H */
Signature · 1 line
2.27.0

A message that is not in the archive (sent off-list or not yet received): 20200616011217.15253-1-patrick.oppenlander-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Applied
#2 lore raw
Quoted 3 lines · On Tue, Jun 16, 2020 at 11:12:17AM +1000…

From: Patrick Oppenlander <[email protected]>

Applied, thanks.

Quoted 28 lines
---
 libfdt/libfdt.h | 8 ++++++++
 1 file changed, 8 insertions(+)
libfdt/libfdt.h +8 -0
index 48f375c..544d3ef 100644
@@ -9,6 +9,10 @@
 #include <libfdt_env.h>
 #include <fdt.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define FDT_FIRST_SUPPORTED_VERSION	0x02
 #define FDT_LAST_SUPPORTED_VERSION	0x11
 
@@ -2069,4 +2073,8 @@ int fdt_overlay_apply(void *fdt, void *fdto);
 
 const char *fdt_strerror(int errval);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LIBFDT_H */
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson