[vlc-devel] [PATCH 3/3] vlc_messages.h: Declare vlc_module_name as extern "C" when building C++
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Thu Dec 10 15:43:11 CET 2020
Otherwise link might fail
---
include/vlc_messages.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/vlc_messages.h b/include/vlc_messages.h
index b6d5843985..95bce875fb 100644
--- a/include/vlc_messages.h
+++ b/include/vlc_messages.h
@@ -105,7 +105,11 @@ VLC_API void vlc_object_vaLog(vlc_object_t *obj, int prio, const char *module,
#define msg_Dbg(p_this, ...) \
msg_Generic(p_this, VLC_MSG_DBG, __VA_ARGS__)
+#ifndef __cplusplus
extern const char vlc_module_name[];
+#else
+extern "C" const char vlc_module_name[];
+#endif
VLC_API const char *vlc_strerror(int);
VLC_API const char *vlc_strerror_c(int);
--
2.29.2
More information about the vlc-devel
mailing list