Browse Source

fix gcc-implicit-definitions

Program is using implicit definitions of special functions.
these functions need to use their correct prototypes to
allow the lightweight buffer overflow checking to work.

 - Implicit memory/string functions need #include <string.h>
 - Implicit *printf functions need #include <stdio.h>
 - Implicit *printf functions need #include <stdio.h>
 - Implicit *read* functions need #include <unistd.h>
 - Implicit *recv* functions need #include <sys/socket.h>

Signed-off-by: madanyang <toganm@opensuse.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
madanyang 8 years ago
parent
commit
085c7228ce
1 changed files with 3 additions and 0 deletions
  1. 3 0
      png.c

+ 3 - 0
png.c

@@ -21,6 +21,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <string.h>
+#include <unistd.h>
+#include <sys/socket.h>
 #include <png.h>
 #include "const.h"