diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2015-12-15 19:25:16 -0500 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2015-12-15 19:28:22 -0500 |
commit | 4c19b415bd75accbb13cb4a4149e6858f6f37f9c (patch) | |
tree | db207ddfa831a37df1819a7e6fac88d5994470bc /gst-libs | |
parent | 34faa2d79aceef25ba9a5452a62c8afbe5365257 (diff) | |
download | gstreamer-plugins-bad-4c19b415bd75accbb13cb4a4149e6858f6f37f9c.tar.gz |
gl: Allow using non-system mesa with both GL and GLES
GCC automatically disable redundance warnings for system headers. As
soon as we start using a non-system installed mesa, we would start
having issues. The test for both wasn't setting any flags, so it would
work but then fail at runtime.
This is being fixed by disabling in the code (where needed only) that
GCC warning. The test is also fixed to avoid the false positive we had.
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/gl/gstglapi.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gst-libs/gst/gl/gstglapi.h b/gst-libs/gst/gl/gstglapi.h index dd44b4523..ab1a203f5 100644 --- a/gst-libs/gst/gl/gstglapi.h +++ b/gst-libs/gst/gl/gstglapi.h @@ -23,6 +23,13 @@ #include <gst/gl/gstglconfig.h> +/* This mimic GCC behaviour with system headers files even if GL headers may + * not be in the system header path. */ +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wredundant-decls" +#endif + /* OpenGL 2.0 for Embedded Systems */ #if GST_GL_HAVE_GLES2 #ifndef GL_GLEXT_PROTOTYPES @@ -57,6 +64,10 @@ # endif #endif +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + #ifdef WINAPI #define GSTGLAPI WINAPI #else |