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

Martin Storsjö git at videolan.org
Tue Mar 10 12:51:29 CET 2020


vlc | branch: master | Martin Storsjö <martin at martin.st> | Tue Mar 10 11:47:13 2020 +0200| [300439c0553e9e32c144ad2be5f8dfc6e7b3039e] | 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.

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

 modules/codec/dmo/dmo.h          | 30 +++++++++++++++---------------
 modules/video_chroma/d3d11_fmt.h |  2 +-
 modules/video_chroma/d3d9_fmt.h  |  2 +-
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/modules/codec/dmo/dmo.h b/modules/codec/dmo/dmo.h
index 60e6f6cc69..8f86418c71 100644
--- a/modules/codec/dmo/dmo.h
+++ b/modules/codec/dmo/dmo.h
@@ -20,21 +20,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
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index e7ad41fcea..946850cb31 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -92,7 +92,7 @@ static inline bool is_d3d11_opaque(vlc_fourcc_t chroma)
            chroma == VLC_CODEC_D3D11_OPAQUE_BGRA;
 }
 
-const struct vlc_video_context_operations d3d11_vctx_ops;
+extern const struct vlc_video_context_operations d3d11_vctx_ops;
 
 picture_sys_d3d11_t *ActiveD3D11PictureSys(picture_t *);
 
diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h
index 0cfe080694..34c9fd7514 100644
--- a/modules/video_chroma/d3d9_fmt.h
+++ b/modules/video_chroma/d3d9_fmt.h
@@ -91,7 +91,7 @@ static inline bool is_d3d9_opaque(vlc_fourcc_t chroma)
     }
 }
 
-const struct vlc_video_context_operations d3d9_vctx_ops;
+extern const struct vlc_video_context_operations d3d9_vctx_ops;
 
 picture_sys_d3d9_t *ActiveD3D9PictureSys(picture_t *);
 



More information about the vlc-commits mailing list