From dac278775ae14655179ed4a40231043a5b786f40 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Tue, 26 Aug 2014 19:37:06 +0000
Subject: [PATCH] Fix issues with replaced compat functions in C++ modules

Notably poll, inet*, swab, *rand48, and tsearch
---
 include/vlc_fixups.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index c3d5fac176da..a4b9b2d250c7 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -256,6 +256,10 @@ static inline locale_t newlocale(int mask, const char * locale, locale_t base)
 #define N_(str)           gettext_noop (str)
 #define gettext_noop(str) (str)
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef HAVE_SWAB
 void swab (const void *, void *, ssize_t);
 #endif
@@ -339,6 +343,10 @@ long jrand48 (unsigned short subi[3]);
 long nrand48 (unsigned short subi[3]);
 #endif
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
 #ifdef __OS2__
 # undef HAVE_FORK   /* Implementation of fork() is imperfect on OS/2 */
 #endif
-- 
GitLab