#13857 closed bug (invalid)

#include_next is broken for system headers

Reported by: leorize Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/POSIX Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: x86-64

Description

Test case:

echo '#include <bsd/string.h>' | gcc -D_BSD_SOURCE -x c -

Results:

/boot/system/develop/headers/bsd/string.h:9:25: error: no include path in which to search for string.h

Expected:

/boot/system/develop/lib/start_dyn.o: In function `_start':
start_dyn.c:(.text+0x4d): undefined reference to `main'
collect2: error: ld returned 1 exit status

Walkaround:

echo '#include <bsd/string.h>' | gcc -D_BSD_SOURCE -include string.h -x c -

Also appliable to clang

This issue is a blocker for any ports that use libbsd

Haiku x86_64 hrev51659

Change History (1)

comment:1 Changed 19 months ago by waddlesplash

Resolution: invalid
Status: newclosed

As mentioned on the HaikuPorts issue, this is incorrect; you use -D_BSD_SOURCE and proper include paths and then #include <string.h>.

Note: See TracTickets for help on using tickets.