diff --git a/cogl/cogl/cogl-gles2-context.c b/cogl/cogl/cogl-gles2-context.c index 784c68c25..2f6b87b55 100644 --- a/cogl/cogl/cogl-gles2-context.c +++ b/cogl/cogl/cogl-gles2-context.c @@ -159,10 +159,10 @@ replace_token (char *string, /* NOTE: this assumes token and replacement are the same length */ - while ((token_pos = _cogl_util_memmem (last_pos, - end - last_pos, - token, - token_length))) + while ((token_pos = memmem (last_pos, + end - last_pos, + token, + token_length))) { /* Make sure this isn't in the middle of some longer token */ if ((token_pos <= string || @@ -908,10 +908,10 @@ gl_get_shader_source_wrapper (GLuint shader, /* Strip out the wrapper snippet we added when the source was * specified */ - wrapper_start = _cogl_util_memmem (source, - copy_length, - wrapper_marker, - sizeof (wrapper_marker) - 1); + wrapper_start = memmem (source, + copy_length, + wrapper_marker, + sizeof (wrapper_marker) - 1); if (wrapper_start) { length = wrapper_start - source; diff --git a/cogl/cogl/cogl-util.h b/cogl/cogl/cogl-util.h index 4e4bd3247..912cc893e 100644 --- a/cogl/cogl/cogl-util.h +++ b/cogl/cogl/cogl-util.h @@ -163,8 +163,6 @@ _cogl_util_pixel_format_from_masks (unsigned long r_mask, #define _COGL_STATIC_ASSERT(EXPRESSION, MESSAGE) \ _Static_assert (EXPRESSION, MESSAGE); -#define _cogl_util_memmem memmem - static inline void _cogl_util_scissor_intersect (int rect_x0, int rect_y0, diff --git a/meson.build b/meson.build index db316507e..adc9faacc 100644 --- a/meson.build +++ b/meson.build @@ -272,6 +272,7 @@ endif required_functions = [ 'ffs', 'clz', + 'memmem', ] foreach function : required_functions if not cc.has_function(function)