From 634e1583d3b76eff927332ced54509365b20ff53 Mon Sep 17 00:00:00 2001 From: jfv Date: Fri, 12 Jul 2013 22:36:26 +0000 Subject: Change the E1000 driver option header handling to match the ixgbe driver. As it was, when building them as a module INET and INET6 are not defined. In these drivers it does not cause a panic, however it does result in different behavior in the ioctl routine when you are using a module vs static, and I think the behavior should be the same. MFC after: 3 days --- sys/modules/em/Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'sys/modules/em/Makefile') diff --git a/sys/modules/em/Makefile b/sys/modules/em/Makefile index 870d48a..545e37d 100644 --- a/sys/modules/em/Makefile +++ b/sys/modules/em/Makefile @@ -1,7 +1,10 @@ # $FreeBSD$ + +.include + .PATH: ${.CURDIR}/../../dev/e1000 KMOD = if_em -SRCS = device_if.h bus_if.h pci_if.h opt_inet.h +SRCS = device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h SRCS += $(CORE_SRC) $(LEGACY_SRC) SRCS += $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED) CORE_SRC = if_em.c e1000_osdep.c @@ -18,4 +21,16 @@ CFLAGS += -I${.CURDIR}/../../dev/e1000 # DEVICE_POLLING for a non-interrupt-driven method #CFLAGS += -DDEVICE_POLLING +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif + .include -- cgit v1.1