Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/compat/common Apply patch, requested by pgoyette in t...



details:   https://anonhg.NetBSD.org/src/rev/92b7ec29aaf4
branches:  netbsd-8
changeset: 852710:92b7ec29aaf4
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Jan 21 16:51:27 2020 +0000

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

diffstat:

 sys/compat/common/rtsock_50.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 9ff2991e4b31 -r 92b7ec29aaf4 sys/compat/common/rtsock_50.c
--- a/sys/compat/common/rtsock_50.c     Tue Jan 21 16:47:24 2020 +0000
+++ b/sys/compat/common/rtsock_50.c     Tue Jan 21 16:51:27 2020 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index