libnet: Avoid looking for /dev/bpf to decide to use the BPF link layer.

It may not be available in the build sandbox, in which case libnet
thinks we're on Win32 and fails horribly.
This commit is contained in:
nia 2021-11-09 11:56:24 +00:00
parent 30188dbd69
commit af69f7677b

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.36 2021/07/22 07:58:50 wiz Exp $
# $NetBSD: Makefile,v 1.37 2021/11/09 11:56:24 nia Exp $
DISTNAME= libnet-1.2
CATEGORIES= devel net
@ -13,6 +13,14 @@ LICENSE= 2-clause-bsd
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "Linux"
CONFIGURE_ARGS+= --with-link-layer=linux
.elif exists(/usr/include/net/bpf.h)
CONFIGURE_ARGS+= --with-link-layer=bpf
.endif
.include "options.mk"
.include "../../mk/bsd.pkg.mk"