Index | Thread | Search

From:
Alexander Bluhm <bluhm@openbsd.org>
Subject:
ip_gre.c conditional compile
To:
tech@openbsd.org
Date:
Sat, 13 Jul 2024 12:35:39 +0200

Download raw body.

Thread
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
 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 */