[vlc-commits] Add missing "extern" to fix building with -fno-common

Martin Storsjö git at videolan.org
Wed Sep 30 09:15:26 CEST 2020


vlc/vlc-3.0 | branch: master | Martin Storsjö <martin at martin.st> | Tue Mar 10 11:47:13 2020 +0200| [c9c387f3c64870d82d164df191146312a8696f25] | committer: Martin Storsjö

Add missing "extern" to fix building with -fno-common

Clang 11 has switched to default to -fno-common, just like GCC 10
has. This requires properly declaring varibles with extern in headers.

Rebased: Some parts of the original commit applied to bits that don't
exist in the 3.0 branch.

(cherry picked from commit 300439c0553e9e32c144ad2be5f8dfc6e7b3039e)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=c9c387f3c64870d82d164df191146312a8696f25
---

 modules/codec/dmo/dmo.h | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/modules/codec/dmo/dmo.h b/modules/codec/dmo/dmo.h
index d69b970652..3b340cf6c6 100644
--- a/modules/codec/dmo/dmo.h
+++ b/modules/codec/dmo/dmo.h
@@ -21,21 +21,21 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-const GUID IID_IUnknown;
-const GUID IID_IClassFactory;
-const GUID IID_IWMCodecPrivateData;
-const GUID IID_IMediaObject;
-const GUID IID_IMediaBuffer;
-const GUID MEDIATYPE_Video;
-const GUID MEDIATYPE_Audio;
-const GUID MEDIASUBTYPE_PCM;
-const GUID FORMAT_VideoInfo;
-const GUID FORMAT_WaveFormatEx;
-const GUID GUID_NULL;
-const GUID MEDIASUBTYPE_I420;
-const GUID MEDIASUBTYPE_YV12;
-const GUID MEDIASUBTYPE_RGB24;
-const GUID MEDIASUBTYPE_RGB565;
+extern const GUID IID_IUnknown;
+extern const GUID IID_IClassFactory;
+extern const GUID IID_IWMCodecPrivateData;
+extern const GUID IID_IMediaObject;
+extern const GUID IID_IMediaBuffer;
+extern const GUID MEDIATYPE_Video;
+extern const GUID MEDIATYPE_Audio;
+extern const GUID MEDIASUBTYPE_PCM;
+extern const GUID FORMAT_VideoInfo;
+extern const GUID FORMAT_WaveFormatEx;
+extern const GUID GUID_NULL;
+extern const GUID MEDIASUBTYPE_I420;
+extern const GUID MEDIASUBTYPE_YV12;
+extern const GUID MEDIASUBTYPE_RGB24;
+extern const GUID MEDIASUBTYPE_RGB565;
 
 
 #ifndef _WIN32



More information about the vlc-commits mailing list