Debian Codegraph @

utils/keytable/bpf_protocols/cc_sys_includes.sh

raw
1 #!/bin/sh
2 # Get C compiler's default includes on this system, as the BPF toolchain
3 # generally doesn't see the Linux headers. This fixes "missing" files on some
4 # architectures/distros, such as asm/byteorder.h, asm/socket.h, asm/sockios.h,
5 # sys/cdefs.h etc.
6 #
7 # Use '-idirafter': Don't interfere with include mechanics except where the
8 # build would have failed anyways.
9 "$@" -v -E - </dev/null 2>&1 \
10 | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }'