Index | Thread | Search

From:
Jonathan Gray <jsg@jsg.id.au>
Subject:
Re: ip_gre.c conditional compile
To:
Alexander Bluhm <bluhm@openbsd.org>
Cc:
tech@openbsd.org
Date:
Sat, 13 Jul 2024 22:42:11 +1000

Download raw body.

Thread
On Sat, Jul 13, 2024 at 12:35:39PM +0200, Alexander Bluhm wrote:
> Hi,
> 
> Can we add a conditional to conf/files for compiling netinet/ip_gre.c
> only if needed?  Otherwise ramdisk build contains an empty C file.
> 
> ok?
> 
> bluhm
> 
> Index: conf/files
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/sys/conf/files,v
> diff -u -p -r1.733 files
> --- conf/files	12 Jun 2024 12:54:54 -0000	1.733
> +++ conf/files	13 Jul 2024 10:20:52 -0000
> @@ -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			needs-count

needs-count isn't needed here, it being on if_gre.c is enough

>  file netinet/ip_ipsp.c			ipsec | tcp_signature
>  file netinet/ip_spd.c			ipsec | tcp_signature
>  file netinet/ip_ipip.c
> Index: netinet/ip_gre.c
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/ip_gre.c,v
> diff -u -p -r1.87 ip_gre.c
> --- netinet/ip_gre.c	15 Dec 2023 00:24:56 -0000	1.87
> +++ netinet/ip_gre.c	13 Jul 2024 10:20:52 -0000
> @@ -36,10 +36,6 @@
>   * This currently handles IPPROTO_GRE, IPPROTO_MOBILE
>   */
>  
> -
> -#include "gre.h"
> -#if NGRE > 0
> -
>  #include <sys/param.h>
>  #include <sys/systm.h>
>  #include <sys/mbuf.h>
> @@ -114,5 +110,3 @@ gre_send(struct socket *so, struct mbuf 
>  #endif
>  	return rip_send(so, m, nam, control);
>  }
> -
> -#endif /* if NGRE > 0 */
> 
>