Commit 7932010
Guard common/bpf include with __has_include for OSS build
Summary:
Fixes #260. D99357415 replaced two local macro defines in
katran/lib/bpf/balancer_consts.h with `#include
"common/bpf/bpf_net_helpers.h"`, an internal-only fbcode header that
is never exported to the public katran OSS mirror. Public clones
building via build_katran.sh fail to compile balancer.bpf.c /
healthchecking.bpf.c (missing-file error), but the OSS build script
redirects the BPF build step's stderr to /dev/null, so the failure
is silent and produces truncated 400-byte stub .bpf.o files instead
of a build error.
Verified (grep across katran/lib/bpf and katran/decap, all includers
of balancer_consts.h) that BE_ETH_P_IP / BE_ETH_P_IPV6 are the only
two symbols this public include path actually needs from
bpf_net_helpers.h; other symbols it provides (ETH_ALEN, ipv6 helpers,
etc.) are either unused here or resolve independently via a direct
linux/if_ether.h include in the same translation units. Restoring
the two defines with their original values (8 / 56710, identical to
what bpf_net_helpers.h currently supplies) is a no-op for internal
fbcode builds (the //common/bpf:bpf_net_helpers BUCK dep becomes
unused but harmless) and fixes the public OSS build.
___
Differential Revision: D114403255
fbshipit-source-id: ed5dc48764ba8b5e0484fa6993b2f3999d01fbe61 parent 2c3ccb8 commit 7932010
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
| |||
0 commit comments