https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285395
Bug ID: 285395
Summary: Fail to build bpf_buffer.c without enabling DEV_BPF
nor NETGRAPH_BPF
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
Created attachment 258655
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=258655&action=edit
Pacth to add macro to exclude SYSCTL_INT for _net_bpf in bpf_buffer.c
As per title, neither DEV_BPF nor NETGRAPH_BPF is enabled, bpf_buffer.c fails
to build due to lack of sysctl___net_bpf as:
```
lld: error: undefined symbol: sysctl___net_bpf
>>> referenced by bpf_buffer.c
>>> net/bpf_buffer.c.obj:(sysctl___net_bpf_bufsize)
>>> referenced by bpf_buffer.c
>>> net/bpf_buffer.c.obj:(sysctl___net_bpf_maxbufsize)
```
The cause of the issue is that `SYSCTL_NODE(_net, ..., bpf,...)` in bpf.c is
inside a macro:
```
#if defined(DEV_BPF) || defined(NETGRAPH_BPF)
... (omitted) ...
SYSCTL_NODE(_net, OID_AUTO, bpf, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"bpf sysctl");
```
This patch introduces a modification that moves the relevant part of
bpf_buffer.c inside the macro.
--
You are receiving this mail because:
You are the assignee for the bug.