From 4fbed6ad7c93ed9a6a1b8f80b6170aa27c31277e Mon Sep 17 00:00:00 2001 From: bluhm Date: Sat, 13 Jul 2024 13:20:44 +0000 Subject: [PATCH] Add condition to ip_gre.c in files. Use gre condition in conf/files for compiling netinet/ip_gre.c only if needed. Remove #if NGRE > 0 from ip_gre.c that caused ramdisk build to compile an empty C file. OK kn@ deraadt@; input jsg@ --- sys/conf/files | 4 ++-- sys/netinet/ip_gre.c | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 1be0a066e34..a97e3ef225e 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $OpenBSD: files,v 1.733 2024/06/12 12:54:54 bluhm Exp $ +# $OpenBSD: files,v 1.734 2024/07/13 13:20:44 bluhm Exp $ # $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -898,7 +898,7 @@ file netinet/tcp_subr.c file netinet/tcp_timer.c file netinet/tcp_usrreq.c file netinet/udp_usrreq.c -file netinet/ip_gre.c +file netinet/ip_gre.c gre file netinet/ip_ipsp.c ipsec | tcp_signature file netinet/ip_spd.c ipsec | tcp_signature file netinet/ip_ipip.c diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c index 840852b382a..cb903fa52ed 100644 --- a/sys/netinet/ip_gre.c +++ b/sys/netinet/ip_gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_gre.c,v 1.87 2023/12/15 00:24:56 bluhm Exp $ */ +/* $OpenBSD: ip_gre.c,v 1.88 2024/07/13 13:20:44 bluhm Exp $ */ /* $NetBSD: ip_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */ /* @@ -36,10 +36,6 @@ * This currently handles IPPROTO_GRE, IPPROTO_MOBILE */ - -#include "gre.h" -#if NGRE > 0 - #include #include #include @@ -114,5 +110,3 @@ gre_send(struct socket *so, struct mbuf *m, struct mbuf *nam, #endif return rip_send(so, m, nam, control); } - -#endif /* if NGRE > 0 */ -- 2.20.1