there's some logic in includes.h to handle HAVE_STRINGS_H, but none for HAVE_STRING_H the reason for this is that many source files use str* and mem* functions but are inconsistent as to whether they include string.h ... for example, these files do not include string.h, yet they use funcs: entropy.c scard-opensc.c ssh-rand-helper.c in the case of scard-opensc.c, it results in ugly warnings like: scard-opensc.c: In function 'sc_prkey_op_init': scard-opensc.c:176: warning: implicit declaration of function 'strcmp' scard-opensc.c:188: warning: implicit declaration of function 'strlen' scard-opensc.c:188: warning: incompatible implicit declaration of built-in function 'strlen' scard-opensc.c:198: warning: implicit declaration of function 'memset' scard-opensc.c:198: warning: incompatible implicit declaration of built-in function 'memset' scard-opensc.c:204: warning: incompatible implicit declaration of built-in function 'memset'
Created attachment 1247 [details] openssh-4.6_p1-include-string-header.patch this applies against both 4.6_p1 and current portable cvs
Created attachment 1248 [details] Include string.h from *.c files The intent is that the standard headers get included directly from the .c files where possible. The attached patch does that for the files you mentioned, are there any others? Thanks.
*shrug* i was just grepping for common mem/str funcs and found those three files ...
Patch #1248 was committed a while back and will be in the next major release (4.7). Thanks for the report.
Close resolved bugs after release.