There are various C99 compatibility issues. For example, some translation units do not include <string.h> if <strings.h> is available (and it is on GNU/Linux), resulting in implicit function declarations. I'm going to try to fix this. I don't see a way to report patches upstream, which is why I'm filing this bug here for tracking purposes.
Created attachment 1933261 [details] kBuild-configure-c99.patch
Created attachment 1933262 [details] kBuild-c99.patch
Created attachment 2005133 [details] kBuild-c99-2.patch Another fix. This looks like a fix for an actual bug.