https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119218
Bug ID: 119218 Summary: cobol, build : conflict between liberty and directly-included system-header. Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: build Severity: normal Priority: P3 Component: cobol Assignee: unassigned at gcc dot gnu.org Reporter: iains at gcc dot gnu.org Target Milestone: --- Build: x86_64-darwin It seems some of the files are directly including system headers, rather than using the system.h approach: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/libgen.h:40:10: error: conflicting declaration of C function ‘char* basename(char*)’ 40 | char *basename(char *); | ^~~~~~~~ In file included from /src-local/gcc-master/gcc/system.h:730, from /src-local/gcc-master/gcc/cobol/cobol-system.h:62, from /src-local/gcc-master/gcc/cobol/cdf-copy.cc:37: /src-local/gcc-master/gcc/../include/libiberty.h:112:14: note: previous declaration ‘char* basename(const char*)’ 112 | extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);