Module Name:    src
Committed By:   maxv
Date:           Sat Dec 16 09:10:30 UTC 2017

Modified Files:
        src/sys/compat/common: rtsock_50.c rtsock_70.c

Log Message:
Build these functions regardless of whether COMPAT_50 or COMPAT_70 are
enabled. They must be there, because they are needed in rtsock.c even
when no compat option is enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/compat/common/rtsock_50.c
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/common/rtsock_70.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/rtsock_50.c
diff -u src/sys/compat/common/rtsock_50.c:1.5 src/sys/compat/common/rtsock_50.c:1.6
--- src/sys/compat/common/rtsock_50.c:1.5	Sat Dec 16 07:59:14 2017
+++ src/sys/compat/common/rtsock_50.c	Sat Dec 16 09:10:30 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_50.c,v 1.5 2017/12/16 07:59:14 mrg Exp $	*/
+/*	$NetBSD: rtsock_50.c,v 1.6 2017/12/16 09:10:30 maxv Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,13 +61,20 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.5 2017/12/16 07:59:14 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.6 2017/12/16 09:10:30 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
 #endif
 
-#if defined(COMPAT_50)
+/*
+ * COMPAT_50 and COMPAT_RTSOCK must be defined for rtsock.c regardless of
+ * the currently enabled options.
+ */
+#ifndef COMPAT_50
+#define COMPAT_50
+#endif
+
 #define	COMPAT_RTSOCK
 
 #include <net/rtsock.c>
@@ -147,5 +154,3 @@ compat_50_iflist(struct ifnet *ifp, stru
 	w->w_where = (char *)w->w_where + len;
 	return 0;
 }
-
-#endif /* COMPAT_50 */

Index: src/sys/compat/common/rtsock_70.c
diff -u src/sys/compat/common/rtsock_70.c:1.1 src/sys/compat/common/rtsock_70.c:1.2
--- src/sys/compat/common/rtsock_70.c:1.1	Wed Sep 21 10:50:23 2016
+++ src/sys/compat/common/rtsock_70.c	Sat Dec 16 09:10:30 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_70.c,v 1.1 2016/09/21 10:50:23 roy Exp $	*/
+/*	$NetBSD: rtsock_70.c,v 1.2 2017/12/16 09:10:30 maxv Exp $	*/
 
 /*
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock_70.c,v 1.1 2016/09/21 10:50:23 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_70.c,v 1.2 2017/12/16 09:10:30 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -43,7 +43,6 @@ __KERNEL_RCSID(0, "$NetBSD: rtsock_70.c,
 #include <compat/net/if.h>
 #include <compat/net/route.h>
 
-#if defined(COMPAT_70)
 void
 compat_70_rt_newaddrmsg1(int cmd, struct ifaddr *ifa)
 {
@@ -112,4 +111,3 @@ compat_70_iflist_addr(struct rt_walkarg 
 	}
 	return error;
 }
-#endif /* COMPAT_70 */

Reply via email to