[PATCH] Include string.h in elf-bfd.h

Nick Clifton nickc@redhat.com
Mon Sep 7 10:04:03 GMT 2020


Hi Saagar,

> elf-bfd.h uses functions from <string.h> but doesn’t include it, which causes problems for a configure test that uses it when compiled with a compiler that is picky about missing prototypes (such as macOS’s as of recently). This patch adds the missing include.

Which configure test(s) are causing this problem ?

The inclusion of <string.h> is actually handled by "sysdep.h", which
handles the correct selection of <string.h> vs <strings.h>.  No normal code
should be including elf-bfd.h without previously including that header.

Configure tests are special, since they are hand crafted, but to me this
sounds like a bug with the configure test, not the elf-bfd.h header.

Cheers
  Nick




More information about the Binutils mailing list