Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103000385
D40183.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D40183.diff
View Options
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -153,6 +153,14 @@
CFLAGS+= ${GCOV_CFLAGS}
+INET_ENABLED!= grep INET opt_inet.h || true ; echo
+INET6_ENABLED!= grep INET6 opt_inet6.h || true ; echo
+.if empty(INET_ENABLED) || empty(INET6_ENABLED)
+CONF_CFLAGS+= -Wno-error=unused-variable
+CONF_CFLAGS+= -Wno-error=unused-but-set-variable
+CONF_CFLAGS+= -Wno-error=unused-function
+.endif
+
# Put configuration-specific C flags last so that they can override
# the others.
CFLAGS+= ${CONF_CFLAGS}
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -208,10 +208,8 @@
{
uint32_t lleflags = 0;
int error = 0;
-#if defined(INET) || defined(INET6)
struct ether_header *eh = (struct ether_header *)phdr;
uint16_t etype;
-#endif
if (plle)
*plle = NULL;
diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c
--- a/sys/net/if_llatbl.c
+++ b/sys/net/if_llatbl.c
@@ -477,9 +477,7 @@
llentry_print_buf(const struct llentry *lle, struct ifnet *ifp, int family,
char *buf, size_t bufsize)
{
-#if defined(INET) || defined(INET6)
char abuf[INET6_ADDRSTRLEN];
-#endif
const char *valid = (lle->r_flags & RLLE_VALID) ? "valid" : "no_l2";
const char *upper_str = rib_print_family(llentry_get_upper_family(lle, family));
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -476,9 +476,7 @@
rtm_get_jailed(struct rt_addrinfo *info, struct ifnet *ifp,
struct nhop_object *nh, union sockaddr_union *saun, struct ucred *cred)
{
-#if defined(INET) || defined(INET6)
struct epoch_tracker et;
-#endif
/* First, see if the returned address is part of the jail. */
if (prison_if(cred, nh->nh_ifa->ifa_addr) == 0) {
@@ -1003,7 +1001,6 @@
}
#endif
-#if defined(INET6) || defined(INET)
static struct sockaddr *
alloc_sockaddr_aligned(struct linear_buffer *lb, int len)
{
@@ -1014,7 +1011,6 @@
lb->offset += len;
return (sa);
}
-#endif
static int
rts_send(struct socket *so, int flags, struct mbuf *m,
@@ -1023,11 +1019,9 @@
struct rt_msghdr *rtm = NULL;
struct rt_addrinfo info;
struct epoch_tracker et;
-#ifdef INET6
struct sockaddr_storage ss;
struct sockaddr_in6 *sin6;
int i, rti_need_deembed = 0;
-#endif
int alloc_len = 0, len, error = 0, fibnum;
sa_family_t saf = AF_UNSPEC;
struct rib_cmd_info rc;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 4:26 PM (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14742503
Default Alt Text
D40183.diff (2 KB)
Attached To
Mode
D40183: build: Reduce the cost of supporting NO<INET|INET6|IP>* variants of the kernel.
Attached
Detach File
Event Timeline
Log In to Comment