dutil: Add missing string.h header include
Addressing this build warning:
In file included from /home/acme/git/pahole/dutil.c:10:
/home/acme/git/pahole/dutil.h: In function ‘strstarts’:
/home/acme/git/pahole/dutil.h:301:9: warning: implicit declaration of function ‘strncmp’ [-Wimplicit-function-declaration]
return strncmp(str, prefix, strlen(prefix)) == 0;
^~~~~~~
/home/acme/git/pahole/dutil.h:301:30: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
return strncmp(str, prefix, strlen(prefix)) == 0;
^~~~~~
/home/acme/git/pahole/dutil.h:301:30: warning: incompatible implicit declaration of built-in function ‘strlen’
/home/acme/git/pahole/dutil.h:301:30: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
/home/acme/git/pahole/dutil.h:20:1:
+#include <string.h>
/home/acme/git/pahole/dutil.h:301:30:
return strncmp(str, prefix, strlen(prefix)) == 0;
^~~~~~
Fixes: a2cdc6c2a0
("dutil: Adopt strstart() from the linux perf tools sources")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
851ef335e3
commit
68b93e6858