Bug 207692 - dev/lmc/if_lmc: module build error with bpf(4) disabled (DEV_BPF)
Summary: dev/lmc/if_lmc: module build error with bpf(4) disabled (DEV_BPF)
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-04 06:18 UTC by O. Hartmann
Modified: 2018-05-20 18:41 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2016-03-04 06:18:13 UTC
If in kernel config file device bpf(4) is disabled for security reasons as suggested by security(7):

# device bpf

the following error prevents from kernel being compiled successfully:


[...]
cc  -c -O3 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /empty/obj/ALG_amd64-CUR/empty/src/ALG/CURRENT/sys/ALG/opt_global.h -I. -I/empty/src/ALG/CURRENT/sys -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/empty/obj/ALG_amd64-CUR/empty/src/ALG/CURRENT/sys/ALG -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -mno-aes -mno-avx -std=iso9899:1999  /empty/src/ALG/CURRENT/sys/amd64/amd64/genassym.c
--- all_subdir_lmc ---
/empty/src/ALG/CURRENT/sys/modules/lmc/../../dev/lmc/if_lmc.c:131:6: error: 'DEV_BPF' is not defined, evaluates to 0 [-Werror,-Wundef]
# if NBPFILTER
     ^
/empty/src/ALG/CURRENT/sys/modules/lmc/../../dev/lmc/if_lmc.c:94:20: note: expanded from macro 'NBPFILTER'
# define NBPFILTER DEV_BPF
                   ^
In file included from /empty/src/ALG/CURRENT/sys/modules/lmc/../../dev/lmc/if_lmc.c:135:
/empty/src/ALG/CURRENT/sys/dev/lmc/if_lmc.h:1156:7: error: 'DEV_BPF' is not defined, evaluates to 0 [-Werror,-Wundef]
# if (NBPFILTER != 0)
      ^
/empty/src/ALG/CURRENT/sys/modules/lmc/../../dev/lmc/if_lmc.c:94:20: note: expanded from macro 'NBPFILTER'
# define NBPFILTER DEV_BPF
                   ^
In file included from /empty/src/ALG/CURRENT/sys/modules/lmc/../../dev/lmc/if_lmc.c:135:
/empty/src/ALG/CURRENT/sys/dev/lmc/if_lmc.h:1166:6: error: 'DEV_BPF' is not defined, evaluates to 0 [-Werror,-Wundef]
#if (NBPFILTER == 0)
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 18:41:26 UTC
# 20180501: retire lmc