mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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:
parent
c3b69f3478
commit
764c4a33bc
4 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "gl.h"
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue