From 764c4a33bc2e2945a9b79bba5aee5ac85e803d06 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 21 Oct 2015 04:44:50 +1100 Subject: [PATCH] gl: fix usage of string.h and stdio.h functions without including the headers e.g: gstglcontext_egl.c:613:7: error: implicit declaration of function 'strcmp' [-Werror=implicit-function-declaration] if (strcmp (G_MODULE_SUFFIX, "so") == 0) --- gst-libs/gst/gl/egl/gsteglimagememory.c | 1 + gst-libs/gst/gl/egl/gstglcontext_egl.c | 2 +- gst-libs/gst/gl/gstglcolorconvert.c | 1 + gst-libs/gst/gl/gstglcontext.c | 6 ++++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/gl/egl/gsteglimagememory.c b/gst-libs/gst/gl/egl/gsteglimagememory.c index eb45830c68..6e13a9fe02 100644 --- a/gst-libs/gst/gl/egl/gsteglimagememory.c +++ b/gst-libs/gst/gl/egl/gsteglimagememory.c @@ -25,6 +25,7 @@ #endif #include "gsteglimagememory.h" +#include GST_DEBUG_CATEGORY_STATIC (GST_CAT_EGL_IMAGE_MEMORY); #define GST_CAT_DEFAULT GST_CAT_EGL_IMAGE_MEMORY diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.c b/gst-libs/gst/gl/egl/gstglcontext_egl.c index 5727636d2e..2d3af188bb 100644 --- a/gst-libs/gst/gl/egl/gstglcontext_egl.c +++ b/gst-libs/gst/gl/egl/gstglcontext_egl.c @@ -610,7 +610,7 @@ load_egl_module (gpointer user_data) #else /* On Linux the .so is only in -dev packages, try with a real soname * Proper compilers will optimize away the strcmp */ - if (strcmp (G_MODULE_SUFFIX, "so") == 0) + if (g_strcmp0 (G_MODULE_SUFFIX, "so") == 0) module_egl = g_module_open ("libEGL.so.1", G_MODULE_BIND_LAZY); /* This automatically handles the suffix and even .la files */ diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c index 1ab538f435..b9e04a190e 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.c +++ b/gst-libs/gst/gl/gstglcolorconvert.c @@ -22,6 +22,7 @@ #include "config.h" #endif +#include #include #include "gl.h" diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index b4d57181f5..10cfe149c7 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -41,6 +41,8 @@ #endif #include +#include +#include #include "gl.h" #include "gstglcontext.h" @@ -86,7 +88,7 @@ load_opengl_module (gpointer user_data) #else /* On Linux the .so is only in -dev packages, try with a real soname * Proper compilers will optimize away the strcmp */ - if (strcmp (G_MODULE_SUFFIX, "so") == 0) + if (g_strcmp0 (G_MODULE_SUFFIX, "so") == 0) module_opengl = g_module_open ("libGL.so.1", G_MODULE_BIND_LAZY); /* This automatically handles the suffix and even .la files */ @@ -111,7 +113,7 @@ load_gles2_module (gpointer user_data) #else /* On Linux the .so is only in -dev packages, try with a real soname * Proper compilers will optimize away the strcmp */ - if (strcmp (G_MODULE_SUFFIX, "so") == 0) + if (g_strcmp0 (G_MODULE_SUFFIX, "so") == 0) module_gles2 = g_module_open ("libGLESv2.so.2", G_MODULE_BIND_LAZY); /* This automatically handles the suffix and even .la files */