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

Marvin Scholz epirat07 at gmail.com
Wed Jul 29 13:28:57 CEST 2020


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

diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 17fa3ed09a..7c746cf699 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -282,17 +282,8 @@ int (dirfd) (DIR *);
 DIR *fdopendir (int);
 #endif
 
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-/* stdlib.h */
-#ifndef HAVE_GETENV
-static inline char *getenv (const char *name)
-{
-    (void)name;
-    return NULL;
-}
+#ifndef HAVE_ALIGNED_ALLOC
+void *aligned_alloc(size_t, size_t);
 #endif
 
 #ifndef HAVE_SETENV
@@ -304,8 +295,17 @@ int unsetenv (const char *);
 int posix_memalign(void **, size_t, size_t);
 #endif
 
-#ifndef HAVE_ALIGNED_ALLOC
-void *aligned_alloc(size_t, size_t);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+/* stdlib.h */
+#ifndef HAVE_GETENV
+static inline char *getenv (const char *name)
+{
+    (void)name;
+    return NULL;
+}
 #endif
 
 #if defined (_WIN32) && defined(__MINGW32__)
-- 
2.24.3 (Apple Git-128)



More information about the vlc-devel mailing list