[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

autoconf injects strchr without including string.h



Hi,

I intend to work on the latest version of xserver-xorg-input-keyboard/ since
it showed up as candidate for the Bug of the Day[1].  Unfortunately the latest
upstream version does not build[2]:

...
configure:12876: checking for gcc options needed to detect all undeclared functions
configure:12898: gcc -c -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/builds/tille/xserver-xorg-input-keyboard/debian/output/source_dir=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection  -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5
conftest.c: In function 'main':
conftest.c:27:8: error: 'strchr' undeclared (first use in this function)
   27 | (void) strchr;
      |        ^~~~~~
conftest.c:1:1: note: 'strchr' is defined in header '<string.h>'; this is probably fixable by adding '#include <string.h>'
...

It might be cheap to simply add the missing  '#include <string.h>'  -
but conftest.c is auto-generated and I think its rather an issue
in autoconf.  Any idea for a temporary workaround?

Kind regards
     Andreas.

[1] https://salsa.debian.org/tille/tiny_qa_tools/-/wikis/Tiny-QA-tasks
[2] https://salsa.debian.org/tille/xserver-xorg-input-keyboard/-/jobs/6333708#L1745

-- 
https://fam-tille.de


Reply to: