Skip to content

gif: Fix build on Solaris by including <string.h>

Alan Coopersmith requested to merge alanc/gdk-pixbuf:solaris into master

Fixes build failure of:

../gdk-pixbuf/io-gif-animation.c: In function ‘gdk_pixbuf_gif_anim_iter_get_pixbuf’:
../gdk-pixbuf/io-gif-animation.c:418:17: error: implicit declaration of function ‘memset’ [-Werror=implicit-function-declaration]
  418 |                 memset (gdk_pixbuf_get_pixels (anim->last_frame_data), 0, gdk_pixbuf_get_rowstride (anim->last_frame_data) * anim->height);
      |                 ^~~~~~
../gdk-pixbuf/io-gif-animation.c:418:17: warning: incompatible implicit declaration of built-in function ‘memset’
../gdk-pixbuf/io-gif-animation.c:28:1: note: include ‘<string.h>’ or provide a declaration of ‘memset’
   27 | #include "lzw.h"
  +++ |+#include <string.h>
   28 |
../gdk-pixbuf/io-gif-animation.c:443:33: warning: incompatible implicit declaration of built-in function ‘memset’
  443 |                                 memset (line, 0, (x_end - anim->last_frame->x_offset) * 4);
      |                                 ^~~~~~
../gdk-pixbuf/io-gif-animation.c:443:33: note: include ‘<string.h>’ or provide a declaration of ‘memset’
cc1: some warnings being treated as errors

Signed-off-by: Alan Coopersmith alan.coopersmith@oracle.com

Merge request reports