Opened 3 years ago

Closed 3 years ago

#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:
Platform: x86-64


Test case:

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


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


/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


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 by waddlesplash, 3 years ago

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.