Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/common Build these functions regardless of whethe...



details:   https://anonhg.NetBSD.org/src/rev/d5f93977baff
branches:  trunk
changeset: 358186:d5f93977baff
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Dec 16 09:10:30 2017 +0000

description:
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.

diffstat:

 sys/compat/common/rtsock_50.c |  15 ++++++++++-----
 sys/compat/common/rtsock_70.c |   6 ++----
 2 files changed, 12 insertions(+), 9 deletions(-)

diffs (69 lines):

diff -r 4dc04b2d7ad0 -r d5f93977baff sys/compat/common/rtsock_50.c
--- a/sys/compat/common/rtsock_50.c     Sat Dec 16 08:31:36 2017 +0000
+++ b/sys/compat/common/rtsock_50.c     Sat Dec 16 09:10:30 2017 +0000
@@ -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 @@
        w->w_where = (char *)w->w_where + len;
        return 0;
 }
-
-#endif /* COMPAT_50 */
diff -r 4dc04b2d7ad0 -r d5f93977baff sys/compat/common/rtsock_70.c
--- a/sys/compat/common/rtsock_70.c     Sat Dec 16 08:31:36 2017 +0000
+++ b/sys/compat/common/rtsock_70.c     Sat Dec 16 09:10:30 2017 +0000
@@ -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 @@
 #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 @@
        }
        return error;
 }
-#endif /* COMPAT_70 */



Home | Main Index | Thread Index | Old Index