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)
This commit is contained in:
Matthew Waters 2015-10-21 04:44:50 +11:00 committed by Tim-Philipp Müller
parent c3b69f3478
commit 764c4a33bc
4 changed files with 7 additions and 3 deletions

View file

@ -25,6 +25,7 @@
#endif
#include "gsteglimagememory.h"
#include <string.h>
GST_DEBUG_CATEGORY_STATIC (GST_CAT_EGL_IMAGE_MEMORY);
#define GST_CAT_DEFAULT GST_CAT_EGL_IMAGE_MEMORY

View file

@ -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 */

View file

@ -22,6 +22,7 @@
#include "config.h"
#endif
#include <string.h>
#include <stdio.h>
#include "gl.h"

View file

@ -41,6 +41,8 @@
#endif
#include <gmodule.h>
#include <string.h>
#include <stdio.h>
#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 */