[vlc-devel] [PATCH v2 7/7] include: move more compat functions in extern C block

Marvin Scholz epirat07 at gmail.com
Thu Aug 6 00:07:25 CEST 2020


This ensures they have the correct linkage declared.
---
 include/vlc_fixups.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 15ebb0bd208..51286f56d61 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -295,6 +295,10 @@ static inline char *getenv (const char *name)
 }
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef HAVE_SETENV
 int setenv (const char *, const char *, int);
 int unsetenv (const char *);
@@ -308,6 +312,10 @@ int posix_memalign(void **, size_t, size_t);
 void *aligned_alloc(size_t, size_t);
 #endif
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
 #if defined (_WIN32) && defined(__MINGW32__)
 #define aligned_free(ptr)  __mingw_aligned_free(ptr)
 #elif defined (_WIN32) && defined(_MSC_VER)
-- 
2.24.3 (Apple Git-128)



More information about the vlc-devel mailing list