Module Name:    src
Committed By:   martin
Date:           Tue Jan 21 16:51:27 UTC 2020

Modified Files:
        src/sys/compat/common [netbsd-8]: rtsock_50.c

Log Message:
Apply patch, requested by pgoyette in ticket #1484:

        sys/compat/common/rtsock_50.c (patch)

PR kern/54861:

For MODULAR kernels, we include all of the compat code, even if not
required by the selected COMPAT_xx options.  Thus, rtsock_14.c is
included in the kernel.

rtsock_14.c in turn references routines in rtsock_50.c which is also
included in the kernel.  However, if the kernel is built without the
COMPAT_50 option, rtsock_50.c ends up being a no-op and doesn't
define any of the routines that rtsock_14.c needs.

Thus, MODULAR kernels which only have COMPAT_60 (or newer) will fail
to link becuase of the undefined symbols.

Fix is to make rtsock_50.c functional if MODULAR kernel option is
specified.


To generate a diff of this commit:
cvs rdiff -u -r1.4.10.1 -r1.4.10.2 src/sys/compat/common/rtsock_50.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.4.10.1 src/sys/compat/common/rtsock_50.c:1.4.10.2
--- src/sys/compat/common/rtsock_50.c:1.4.10.1	Sat Jun  9 14:38:18 2018
+++ src/sys/compat/common/rtsock_50.c	Tue Jan 21 16:51:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_50.c,v 1.4.10.1 2018/06/09 14:38:18 martin Exp $	*/
+/*	$NetBSD: rtsock_50.c,v 1.4.10.2 2020/01/21 16:51:27 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,14 +61,15 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.4.10.1 2018/06/09 14:38:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.4.10.2 2020/01/21 16:51:27 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
+#include "opt_modular.h"
 #endif
 
-#if defined(COMPAT_14) && !defined(COMPAT_50)
-#define	COMPAT_50	1	/* 1.4 needs 5.0 */
+#if (defined(MODULAR) || defined(COMPAT_14)) && !defined(COMPAT_50)
+#define	COMPAT_50	1	/* MODULAR and 1.4 need 5.0 */
 #endif
 
 #if defined(COMPAT_50)

Reply via email to