Module Name:    src
Committed By:   pgoyette
Date:           Tue Apr 17 00:02:59 UTC 2018

Modified Files:
        src/distrib/sets/lists/modules [pgoyette-compat]: mi
        src/sys/compat/common [pgoyette-compat]: compat_mod.c compat_mod.h
            files.common kern_exit_43.c kern_info_09.c kern_info_43.c
            kern_resource_43.c kern_sig_43.c tty_43.c uipc_syscalls_43.c
            vfs_syscalls_10.c vfs_syscalls_43.c vm_43.c
        src/sys/modules [pgoyette-compat]: Makefile
        src/sys/sys [pgoyette-compat]: vfs_syscalls.h
Added Files:
        src/sys/modules/compat_09 [pgoyette-compat]: Makefile
        src/sys/modules/compat_10 [pgoyette-compat]: Makefile
        src/sys/modules/compat_43 [pgoyette-compat]: Makefile

Log Message:
First pass at compat modules for 4.3BSD, NetBSD-0.9, and NetBSD-1.0

XXX Still need to deal with the sysctl stuff and other code shared
XXX between 09 and 43


To generate a diff of this commit:
cvs rdiff -u -r1.114.2.14 -r1.114.2.15 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.24.14.32 -r1.24.14.33 src/sys/compat/common/compat_mod.c
cvs rdiff -u -r1.1.42.19 -r1.1.42.20 src/sys/compat/common/compat_mod.h
cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/sys/compat/common/files.common
cvs rdiff -u -r1.22 -r1.22.62.1 src/sys/compat/common/kern_exit_43.c
cvs rdiff -u -r1.20 -r1.20.96.1 src/sys/compat/common/kern_info_09.c
cvs rdiff -u -r1.35 -r1.35.28.1 src/sys/compat/common/kern_info_43.c
cvs rdiff -u -r1.21 -r1.21.96.1 src/sys/compat/common/kern_resource_43.c
cvs rdiff -u -r1.34 -r1.34.56.1 src/sys/compat/common/kern_sig_43.c
cvs rdiff -u -r1.30 -r1.30.26.1 src/sys/compat/common/tty_43.c
cvs rdiff -u -r1.47.14.1 -r1.47.14.2 src/sys/compat/common/uipc_syscalls_43.c
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/vfs_syscalls_10.c
cvs rdiff -u -r1.62.2.1 -r1.62.2.2 src/sys/compat/common/vfs_syscalls_43.c
cvs rdiff -u -r1.20 -r1.20.8.1 src/sys/compat/common/vm_43.c
cvs rdiff -u -r1.202.2.18 -r1.202.2.19 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_09/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_10/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_43/Makefile
cvs rdiff -u -r1.23.2.1 -r1.23.2.2 src/sys/sys/vfs_syscalls.h

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

Modified files:

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.114.2.14 src/distrib/sets/lists/modules/mi:1.114.2.15
--- src/distrib/sets/lists/modules/mi:1.114.2.14	Sat Mar 31 09:17:35 2018
+++ src/distrib/sets/lists/modules/mi	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.114.2.14 2018/03/31 09:17:35 pgoyette Exp $
+# $NetBSD: mi,v 1.114.2.15 2018/04/17 00:02:58 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -70,6 +70,10 @@
 ./@MODULEDIR@/compat/compat.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/compat_util			base-kernel-modules	kmod
 ./@MODULEDIR@/compat_util/compat_util.kmod	base-kernel-modules	kmod
+./@MODULEDIR@/compat_09				base-kernel-modules	kmod
+./@MODULEDIR@/compat_09/compat_09.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/compat_10				base-kernel-modules	kmod
+./@MODULEDIR@/compat_10/compat_10.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/compat_12				base-kernel-modules	kmod
 ./@MODULEDIR@/compat_12/compat_12.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/compat_13				base-kernel-modules	kmod
@@ -84,6 +88,8 @@
 ./@MODULEDIR@/compat_30/compat_30.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/compat_40				base-kernel-modules	kmod
 ./@MODULEDIR@/compat_40/compat_40.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/compat_43				base-kernel-modules	kmod
+./@MODULEDIR@/compat_43/compat_43.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/compat_50				base-kernel-modules	kmod
 ./@MODULEDIR@/compat_50/compat_50.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/compat_60				base-kernel-modules	kmod

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.32 src/sys/compat/common/compat_mod.c:1.24.14.33
--- src/sys/compat/common/compat_mod.c:1.24.14.32	Mon Apr 16 01:59:56 2018
+++ src/sys/compat/common/compat_mod.c	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.32 2018/04/16 01:59:56 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.33 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,14 +34,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.32 2018/04/16 01:59:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.33 2018/04/17 00:02:58 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
 #include "opt_compat_43.h"
-#include "opt_ntp.h"
-#include "opt_sysv.h"
-#include "opt_lfs.h"
 #endif
 
 #include <sys/systm.h>
@@ -53,86 +50,24 @@ __KERNEL_RCSID(0, "$NetBSD: compat_mod.c
 #include <sys/syscallargs.h>
 #include <sys/syscallvar.h>
 #include <sys/sysctl.h>
-#include <sys/vfs_syscalls.h>
-
-#include <net/if.h>
-
-#include <uvm/uvm_extern.h>
-#include <uvm/uvm_object.h>
 
 #include <compat/common/compat_util.h>
 #include <compat/common/compat_mod.h>
-#include <compat/common/if_43.h>
-#include <compat/sys/uvm.h>
-#include <compat/sys/cpuio.h>
 
 #if defined(COMPAT_09) || defined(COMPAT_43)
 static struct sysctllog *compat_clog = NULL;
 #endif
 
-#ifdef COMPAT_70
-#include <net/route.h>
-#include <compat/net/route.h>
-#include <compat/net/route_70.h>
-#endif
-
 static const char * const compat_includes[] = {
 	"compat_80", "compat_70", "compat_60", "compat_50", "compat_40",
 	"compat_30", "compat_20", "compat_16", "compat_14", "compat_13",
-	"compat_12", NULL
+	"compat_12", /*"compat_10", "compat_09",*/ "compat_43", NULL
 };
 
 MODULE_WITH_ALIASES(MODULE_CLASS_EXEC, compat, NULL, &compat_includes);
 
-
 extern krwlock_t ttcompat_lock;
 
-static const struct syscall_package compat_syscalls[] = {
-#if defined(COMPAT_43)
-	{ SYS_compat_43_fstat43, 0, (sy_call_t *)compat_43_sys_fstat },
-	{ SYS_compat_43_lstat43, 0, (sy_call_t *)compat_43_sys_lstat },
-	{ SYS_compat_43_oaccept, 0, (sy_call_t *)compat_43_sys_accept },
-	{ SYS_compat_43_ocreat, 0, (sy_call_t *)compat_43_sys_creat },
-	{ SYS_compat_43_oftruncate, 0, (sy_call_t *)compat_43_sys_ftruncate },
-	{ SYS_compat_43_ogetdirentries, 0, (sy_call_t *)compat_43_sys_getdirentries },
-	{ SYS_compat_43_ogetdtablesize, 0, (sy_call_t *)compat_43_sys_getdtablesize },
-	{ SYS_compat_43_ogethostid, 0, (sy_call_t *)compat_43_sys_gethostid },
-	{ SYS_compat_43_ogethostname, 0, (sy_call_t *)compat_43_sys_gethostname },
-	{ SYS_compat_43_ogetkerninfo, 0, (sy_call_t *)compat_43_sys_getkerninfo },
-	{ SYS_compat_43_ogetpagesize, 0, (sy_call_t *)compat_43_sys_getpagesize },
-	{ SYS_compat_43_ogetpeername, 0, (sy_call_t *)compat_43_sys_getpeername },
-	{ SYS_compat_43_ogetrlimit, 0, (sy_call_t *)compat_43_sys_getrlimit },
-	{ SYS_compat_43_ogetsockname, 0, (sy_call_t *)compat_43_sys_getsockname },
-	{ SYS_compat_43_okillpg, 0, (sy_call_t *)compat_43_sys_killpg },
-	{ SYS_compat_43_olseek, 0, (sy_call_t *)compat_43_sys_lseek },
-	{ SYS_compat_43_ommap, 0, (sy_call_t *)compat_43_sys_mmap },
-	{ SYS_compat_43_oquota, 0, (sy_call_t *)compat_43_sys_quota },
-	{ SYS_compat_43_orecv, 0, (sy_call_t *)compat_43_sys_recv },
-	{ SYS_compat_43_orecvfrom, 0, (sy_call_t *)compat_43_sys_recvfrom },
-	{ SYS_compat_43_orecvmsg, 0, (sy_call_t *)compat_43_sys_recvmsg },
-	{ SYS_compat_43_osend, 0, (sy_call_t *)compat_43_sys_send },
-	{ SYS_compat_43_osendmsg, 0, (sy_call_t *)compat_43_sys_sendmsg },
-	{ SYS_compat_43_osethostid, 0, (sy_call_t *)compat_43_sys_sethostid },
-	{ SYS_compat_43_osethostname, 0, (sy_call_t *)compat_43_sys_sethostname },
-	{ SYS_compat_43_osetrlimit, 0, (sy_call_t *)compat_43_sys_setrlimit },
-	{ SYS_compat_43_osigblock, 0, (sy_call_t *)compat_43_sys_sigblock },
-	{ SYS_compat_43_osigsetmask, 0, (sy_call_t *)compat_43_sys_sigsetmask },
-	{ SYS_compat_43_osigstack, 0, (sy_call_t *)compat_43_sys_sigstack },
-	{ SYS_compat_43_osigvec, 0, (sy_call_t *)compat_43_sys_sigvec },
-	{ SYS_compat_43_otruncate, 0, (sy_call_t *)compat_43_sys_truncate },
-	{ SYS_compat_43_owait, 0, (sy_call_t *)compat_43_sys_wait },
-	{ SYS_compat_43_stat43, 0, (sy_call_t *)compat_43_sys_stat },
-#endif
-
-#if defined(COMPAT_09)
-	{ SYS_compat_09_ogetdomainname, 0, (sy_call_t *)compat_09_sys_getdomainname },
-	{ SYS_compat_09_osetdomainname, 0, (sy_call_t *)compat_09_sys_setdomainname },
-	{ SYS_compat_09_ouname, 0, (sy_call_t *)compat_09_sys_uname },
-#endif
-
-	{ 0, 0, NULL },
-};
-
 struct compat_init_fini {
 	int (*init)(void);
 	int (*fini)(void);
@@ -170,7 +105,6 @@ struct compat_init_fini {
 #ifdef COMPAT_12
 	{ compat_12_init, compat_12_fini },
 #endif
-#if 0	/* NOT YET */
 #ifdef COMPAT_10
 	{ compat_10_init, compat_10_fini },
 #endif
@@ -180,7 +114,6 @@ struct compat_init_fini {
 #ifdef COMPAT_43
 	{ compat_43_init, compat_43_fini },
 #endif
-#endif /* 0 NOT YET */
 };
 
 static int
@@ -207,53 +140,10 @@ compat_modcmd(modcmd_t cmd, void *arg)
 			}
 		}
 
-		error = syscall_establish(NULL, compat_syscalls);
-		if (error != 0) {
-			return error;
-		}
-#ifdef NOTYET /* XXX */
-#ifdef COMPAT_43
-/* XXX
- * XXX This would mean that compat_43 and compat_60 are mutually
- * XXX exclusive.  Rather we should save the original vector
- * XXX value, and retore it if we unload.  Note that compat_43
- * XXX should "require" compat_60 to provide a definitive order
- * XXX of initialization (ie, compat_60 first, then compat_43).
- * XXX
-		KASSERT(ttcompatvec == NULL);
-		ttcompatvec = ttcompat;
-		if_43_init();
- * XXX */
-#endif
-#endif /* XXX NOTYET */
-#ifdef COMPAT_10
-		vfs_syscalls_10_init();
-#endif
 		compat_sysctl_init();
 		return 0;
 
 	case MODULE_CMD_FINI:
-#ifdef COMPAT_10
-		vfs_syscalls_10_fini();
-#endif
-		/* Unlink the system calls. */
-		error = syscall_disestablish(NULL, compat_syscalls);
-		if (error != 0) {
-			return error;
-		}
-#ifdef NOTYET /* XXX */
-#ifdef COMPAT_43
-		/* Unlink ttcompatvec. */
-		if (rw_tryenter(&ttcompat_lock, RW_WRITER)) {
-			ttcompatvec = NULL;
-			rw_exit(&ttcompat_lock);
-		} else {
-			error = syscall_establish(NULL, compat_syscalls);
-			KASSERT(error == 0);
-			return EBUSY;
-		}
-#endif
-#endif /* NOTYET XXX */
 		/*
 		 * Disable included components in reverse order;
 		 * if any component fails to fini(), re-init those

Index: src/sys/compat/common/compat_mod.h
diff -u src/sys/compat/common/compat_mod.h:1.1.42.19 src/sys/compat/common/compat_mod.h:1.1.42.20
--- src/sys/compat/common/compat_mod.h:1.1.42.19	Mon Apr 16 03:41:34 2018
+++ src/sys/compat/common/compat_mod.h	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.h,v 1.1.42.19 2018/04/16 03:41:34 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.h,v 1.1.42.20 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -152,4 +152,41 @@ int vfs_syscalls_12_init(void);
 int vfs_syscalls_12_fini(void);
 #endif
 
+#ifdef COMPAT_10
+int compat_10_init(void);
+int compat_10_fini(void);
+void vfs_syscalls_10_init(void);
+void vfs_syscalls_10_fini(void);
+#endif
+
+#ifdef COMPAT_09
+int compat_09_init(void);
+int compat_09_fini(void);
+int kern_info_09_init(void);
+int kern_info_09_fini(void);
+#endif
+
+#ifdef COMPAT_43
+int compat_43_init(void);
+int compat_43_fini(void);
+int kern_exit_43_init(void);
+int kern_exit_43_fini(void);
+int kern_info_43_init(void);
+int kern_info_43_fini(void);
+int kern_resource_43_init(void);
+int kern_resource_43_fini(void);
+int kern_sig_43_init(void);
+int kern_sig_43_fini(void);
+int tty_43_init(void);
+int tty_43_fini(void);
+int uipc_syscalls_43_init(void);
+int uipc_syscalls_43_fini(void);
+int vfs_syscalls_43_init(void);
+int vfs_syscalls_43_fini(void);
+int vm_43_init(void);
+int vm_43_fini(void);
+int if_43_init(void);
+int if_43_fini(void);
+#endif
+
 #endif /* !_COMPAT_MOD_H_ */

Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.30 src/sys/compat/common/files.common:1.1.2.31
--- src/sys/compat/common/files.common:1.1.2.30	Tue Apr  3 08:29:44 2018
+++ src/sys/compat/common/files.common	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.common,v 1.1.2.30 2018/04/03 08:29:44 pgoyette Exp $
+#	$NetBSD: files.common,v 1.1.2.31 2018/04/17 00:02:58 pgoyette Exp $
 
 #
 # Generic files, used by all compat options.
@@ -12,6 +12,7 @@ file	compat/common/compat_util.c		compat
 #
 
 # Compatibility code for 4.3BSD
+file	compat/common/compat_43_mod.c		compat_43
 file	compat/common/kern_exit_43.c		compat_43
 file	compat/common/kern_info_43.c		compat_43
 file	compat/common/kern_resource_43.c	compat_43
@@ -23,9 +24,11 @@ file	compat/common/vm_43.c			compat_43
 file	compat/common/if_43.c			compat_43
 
 # Compatibility code for NetBSD 0.9
+file	compat/common/compat_09_mod.c		compat_09
 file	compat/common/kern_info_09.c		compat_09
 
 # Compatability code for NetBSD 1.0
+file	compat/common/compat_10_mod.c		compat_10
 file	compat/common/vfs_syscalls_10.c		compat_10
 
 # Compatibility code for NetBSD 1.2

Index: src/sys/compat/common/kern_exit_43.c
diff -u src/sys/compat/common/kern_exit_43.c:1.22 src/sys/compat/common/kern_exit_43.c:1.22.62.1
--- src/sys/compat/common/kern_exit_43.c:1.22	Wed Nov  4 21:23:02 2009
+++ src/sys/compat/common/kern_exit_43.c	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit_43.c,v 1.22 2009/11/04 21:23:02 rmind Exp $	*/
+/*	$NetBSD: kern_exit_43.c,v 1.22.62.1 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exit_43.c,v 1.22 2009/11/04 21:23:02 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit_43.c,v 1.22.62.1 2018/04/17 00:02:58 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -57,11 +57,14 @@ __KERNEL_RCSID(0, "$NetBSD: kern_exit_43
 #include <sys/acct.h>
 
 #include <sys/mount.h>
+#include <sys/syscall.h>
+#include <sys/syscallvar.h>
 #include <sys/syscallargs.h>
 
 #include <sys/cpu.h>
 #include <machine/reg.h>
 #include <compat/common/compat_util.h>
+#include <compat/common/compat_mod.h>
 
 #ifdef m68k
 #include <machine/psl.h>		/* only m68k ports use PSL_ALLCC */
@@ -71,6 +74,11 @@ __KERNEL_RCSID(0, "$NetBSD: kern_exit_43
 #define GETPS(rp)	(rp)[PS]
 #endif
 
+static struct syscall_package kern_exit_43_syscalls[] = {
+	{ SYS_compat_43_owait, 0, (sy_call_t *)compat_43_sys_wait },
+	{ 0, 0, NULL}
+};
+
 int
 compat_43_sys_wait(struct lwp *l, const void *v, register_t *retval)
 {
@@ -90,3 +98,17 @@ compat_43_sys_wait(struct lwp *l, const 
 	retval[1] = status;
 	return error;
 }
+
+int
+kern_exit_43_init(void)
+{
+
+	return syscall_establish(NULL, kern_exit_43_syscalls);
+}
+
+int
+kern_exit_43_fini(void)
+{
+
+	return syscall_disestablish(NULL, kern_exit_43_syscalls);
+}

Index: src/sys/compat/common/kern_info_09.c
diff -u src/sys/compat/common/kern_info_09.c:1.20 src/sys/compat/common/kern_info_09.c:1.20.96.1
--- src/sys/compat/common/kern_info_09.c:1.20	Thu Dec 20 23:02:44 2007
+++ src/sys/compat/common/kern_info_09.c	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_info_09.c,v 1.20 2007/12/20 23:02:44 dsl Exp $	*/
+/*	$NetBSD: kern_info_09.c,v 1.20.96.1 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1991, 1993
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_info_09.c,v 1.20 2007/12/20 23:02:44 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_info_09.c,v 1.20.96.1 2018/04/17 00:02:58 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -45,11 +45,25 @@ __KERNEL_RCSID(0, "$NetBSD: kern_info_09
 #include <sys/sysctl.h>
 
 #include <sys/mount.h>
+#include <sys/syscall.h>
+#include <sys/syscallvar.h>
 #include <sys/syscallargs.h>
 
+#include <compat/common/compat_mod.h>
+
+static struct syscall_package kern_info_09_syscalls[] = {
+	{ SYS_compat_09_ogetdomainname, 0,
+	    (sy_call_t *)compat_09_sys_getdomainname },
+	{ SYS_compat_09_osetdomainname, 0,
+	    (sy_call_t *)compat_09_sys_setdomainname },
+	{ SYS_compat_09_ouname, 0, (sy_call_t *)compat_09_sys_uname },
+	{ 0, 0, NULL }
+};
+
 /* ARGSUSED */
 int
-compat_09_sys_getdomainname(struct lwp *l, const struct compat_09_sys_getdomainname_args *uap, register_t *retval)
+compat_09_sys_getdomainname(struct lwp *l,
+    const struct compat_09_sys_getdomainname_args *uap, register_t *retval)
 {
 	/* {
 		syscallarg(char *) domainname;
@@ -67,7 +81,8 @@ compat_09_sys_getdomainname(struct lwp *
 
 /* ARGSUSED */
 int
-compat_09_sys_setdomainname(struct lwp *l, const struct compat_09_sys_setdomainname_args *uap, register_t *retval)
+compat_09_sys_setdomainname(struct lwp *l,
+    const struct compat_09_sys_setdomainname_args *uap, register_t *retval)
 {
 	/* {
 		syscallarg(char *) domainname;
@@ -91,7 +106,8 @@ struct outsname {
 
 /* ARGSUSED */
 int
-compat_09_sys_uname(struct lwp *l, const struct compat_09_sys_uname_args *uap, register_t *retval)
+compat_09_sys_uname(struct lwp *l,
+    const struct compat_09_sys_uname_args *uap, register_t *retval)
 {
 	/* {
 		syscallarg(struct outsname *) name;
@@ -118,3 +134,17 @@ compat_09_sys_uname(struct lwp *l, const
 	return (copyout((void *)&outsname, (void *)SCARG(uap, name),
 			sizeof(struct outsname)));
 }
+
+int
+kern_info_09_init(void)
+{
+
+	return syscall_establish(NULL, kern_info_09_syscalls);
+}
+
+int
+kern_info_09_fini(void)
+{
+
+	return syscall_disestablish(NULL, kern_info_09_syscalls);
+}

Index: src/sys/compat/common/kern_info_43.c
diff -u src/sys/compat/common/kern_info_43.c:1.35 src/sys/compat/common/kern_info_43.c:1.35.28.1
--- src/sys/compat/common/kern_info_43.c:1.35	Mon Mar 24 20:08:08 2014
+++ src/sys/compat/common/kern_info_43.c	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_info_43.c,v 1.35 2014/03/24 20:08:08 christos Exp $	*/
+/*	$NetBSD: kern_info_43.c,v 1.35.28.1 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1991, 1993
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_info_43.c,v 1.35 2014/03/24 20:08:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_info_43.c,v 1.35.28.1 2018/04/17 00:02:58 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -56,9 +56,27 @@ __KERNEL_RCSID(0, "$NetBSD: kern_info_43
 #include <sys/sysctl.h>
 
 #include <sys/mount.h>
+#include <sys/syscall.h>
+#include <sys/syscallvar.h>
 #include <sys/syscallargs.h>
 #include <compat/sys/time.h>
 
+#include <compat/common/compat_mod.h>
+
+static struct syscall_package kern_info_43_syscalls[] = {
+	{ SYS_compat_43_ogetdtablesize, 0,
+	    (sy_call_t *)compat_43_sys_getdtablesize },
+	{ SYS_compat_43_ogethostid, 0, (sy_call_t *)compat_43_sys_gethostid },
+        { SYS_compat_43_ogethostname, 0,
+	    (sy_call_t *)compat_43_sys_gethostname },
+	{ SYS_compat_43_ogetkerninfo, 0,
+	    (sy_call_t *)compat_43_sys_getkerninfo },
+	{ SYS_compat_43_osethostid, 0, (sy_call_t *)compat_43_sys_sethostid },
+	{ SYS_compat_43_osethostname, 0,
+	    (sy_call_t *)compat_43_sys_sethostname },
+	{ 0, 0, NULL }
+};
+
 int
 compat_43_sys_getdtablesize(struct lwp *l, const void *v, register_t *retval)
 {
@@ -311,3 +329,17 @@ compat_43_sys_sethostname(struct lwp *l,
 	return (old_sysctl(&name[0], 2, 0, 0, SCARG(uap, hostname),
 			   SCARG(uap, len), l));
 }
+
+int
+kern_info_43_init(void)
+{
+
+	return syscall_establish(NULL, kern_info_43_syscalls);
+}
+
+int
+kern_info_43_fini(void)
+{
+
+	return syscall_disestablish(NULL, kern_info_43_syscalls);
+}

Index: src/sys/compat/common/kern_resource_43.c
diff -u src/sys/compat/common/kern_resource_43.c:1.21 src/sys/compat/common/kern_resource_43.c:1.21.96.1
--- src/sys/compat/common/kern_resource_43.c:1.21	Thu Dec 20 23:02:44 2007
+++ src/sys/compat/common/kern_resource_43.c	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_resource_43.c,v 1.21 2007/12/20 23:02:44 dsl Exp $	*/
+/*	$NetBSD: kern_resource_43.c,v 1.21.96.1 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_resource_43.c,v 1.21 2007/12/20 23:02:44 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_resource_43.c,v 1.21.96.1 2018/04/17 00:02:58 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -47,8 +47,18 @@ __KERNEL_RCSID(0, "$NetBSD: kern_resourc
 #include <sys/proc.h>
 
 #include <sys/mount.h>
+#include <sys/syscall.h>
+#include <sys/syscallvar.h>
 #include <sys/syscallargs.h>
 
+#include <compat/common/compat_mod.h>
+
+static struct syscall_package kern_resource_43_syscalls[] = {
+	{ SYS_compat_43_ogetrlimit, 0, (sy_call_t *)compat_43_sys_getrlimit },
+	{ SYS_compat_43_osetrlimit, 0, (sy_call_t *)compat_43_sys_setrlimit },
+	{ 0, 0, NULL }
+};
+
 /* ARGSUSED */
 int
 compat_43_sys_getrlimit(struct lwp *l, const struct compat_43_sys_getrlimit_args *uap, register_t *retval)
@@ -92,3 +102,17 @@ compat_43_sys_setrlimit(struct lwp *l, c
 	lim.rlim_max = olim.rlim_max;
 	return (dosetrlimit(l, l->l_proc, which, &lim));
 }
+
+int
+kern_resource_43_init(void)
+{
+
+	return syscall_establish(NULL, kern_resource_43_syscalls);
+}
+
+int
+kern_resource_43_fini(void)
+{
+
+	return syscall_disestablish(NULL, kern_resource_43_syscalls);
+}

Index: src/sys/compat/common/kern_sig_43.c
diff -u src/sys/compat/common/kern_sig_43.c:1.34 src/sys/compat/common/kern_sig_43.c:1.34.56.1
--- src/sys/compat/common/kern_sig_43.c:1.34	Wed Jan 19 10:21:16 2011
+++ src/sys/compat/common/kern_sig_43.c	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig_43.c,v 1.34 2011/01/19 10:21:16 tsutsui Exp $	*/
+/*	$NetBSD: kern_sig_43.c,v 1.34.56.1 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig_43.c,v 1.34 2011/01/19 10:21:16 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig_43.c,v 1.34.56.1 2018/04/17 00:02:58 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -56,11 +56,14 @@ __KERNEL_RCSID(0, "$NetBSD: kern_sig_43.
 #include <sys/core.h>
 #include <sys/kauth.h>
 
+#include <sys/syscall.h>
+#include <sys/syscallvar.h>
 #include <sys/syscallargs.h>
 
 #include <sys/cpu.h>
 
 #include <compat/sys/signal.h>
+#include <compat/common/compat_mod.h>
 
 void compat_43_sigmask_to_sigset(const int *, sigset_t *);
 void compat_43_sigset_to_sigmask(const sigset_t *, int *);
@@ -69,6 +72,15 @@ void compat_43_sigaction_to_sigvec(const
 void compat_43_sigstack_to_sigaltstack(const struct sigstack *, struct sigaltstack *);
 void compat_43_sigaltstack_to_sigstack(const struct sigaltstack *, struct sigstack *);
 
+static struct syscall_package kern_sig_43_syscalls[] = {
+	{ SYS_compat_43_osigblock, 0, (sy_call_t *)compat_43_sys_sigblock },
+	{ SYS_compat_43_osigsetmask, 0, (sy_call_t *)compat_43_sys_sigsetmask },
+	{ SYS_compat_43_osigstack, 0, (sy_call_t *)compat_43_sys_sigstack },
+	{ SYS_compat_43_osigvec, 0, (sy_call_t *)compat_43_sys_sigvec },
+	{ SYS_compat_43_okillpg, 0, (sy_call_t *)compat_43_sys_killpg },
+	{ 0, 0, NULL }
+};
+
 void
 compat_43_sigmask_to_sigset(const int *sm, sigset_t *ss)
 {
@@ -260,3 +272,17 @@ compat_43_sys_killpg(struct lwp *l, cons
 	ksi.ksi_uid = kauth_cred_geteuid(l->l_cred);
 	return killpg1(l, &ksi, pgid, 0);
 }
+
+int
+kern_sig_43_init(void)
+{
+
+	return syscall_establish(NULL, kern_sig_43_syscalls);
+}
+
+int
+kern_sig_43_fini(void)
+{
+
+	return syscall_disestablish(NULL, kern_sig_43_syscalls);
+}

Index: src/sys/compat/common/tty_43.c
diff -u src/sys/compat/common/tty_43.c:1.30 src/sys/compat/common/tty_43.c:1.30.26.1
--- src/sys/compat/common/tty_43.c:1.30	Thu May 22 16:31:19 2014
+++ src/sys/compat/common/tty_43.c	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty_43.c,v 1.30 2014/05/22 16:31:19 dholland Exp $	*/
+/*	$NetBSD: tty_43.c,v 1.30.26.1 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty_43.c,v 1.30 2014/05/22 16:31:19 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_43.c,v 1.30.26.1 2018/04/17 00:02:58 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -76,6 +76,8 @@ __KERNEL_RCSID(0, "$NetBSD: tty_43.c,v 1
 #include <sys/syslog.h>
 #include <sys/ioctl_compat.h>
 
+#include <compat/common/compat_mod.h>
+
 int ttydebug = 0;
 
 static const struct speedtab compatspeeds[] = {
@@ -505,3 +507,17 @@ ttcompatsetlflags(struct tty *tp, struct
 	t->c_lflag = lflag;
 	t->c_cflag = cflag;
 }
+
+int
+tty_43_init(void)
+{
+
+	return 0;
+}
+
+int
+tty_43_fini(void)
+{
+
+	return 0;
+}

Index: src/sys/compat/common/uipc_syscalls_43.c
diff -u src/sys/compat/common/uipc_syscalls_43.c:1.47.14.1 src/sys/compat/common/uipc_syscalls_43.c:1.47.14.2
--- src/sys/compat/common/uipc_syscalls_43.c:1.47.14.1	Thu Mar 22 01:44:47 2018
+++ src/sys/compat/common/uipc_syscalls_43.c	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls_43.c,v 1.47.14.1 2018/03/22 01:44:47 pgoyette Exp $	*/
+/*	$NetBSD: uipc_syscalls_43.c,v 1.47.14.2 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_43.c,v 1.47.14.1 2018/03/22 01:44:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_43.c,v 1.47.14.2 2018/04/17 00:02:58 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -52,6 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall
 #include <sys/protosw.h>
 
 #include <sys/mount.h>
+#include <sys/syscall.h>
+#include <sys/syscallvar.h>
 #include <sys/syscallargs.h>
 
 #include <net/if.h>
@@ -70,6 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall
 #include <compat/sys/sockio.h>
 
 #include <compat/common/compat_util.h>
+#include <compat/common/compat_mod.h>
 
 #include <uvm/uvm_extern.h>
 
@@ -79,6 +82,20 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall
  * connect(2), bind(2), sendto(2)
  */
 
+static struct syscall_package uipc_syscalls_43_syscalls[] = {
+	{ SYS_compat_43_oaccept, 0, (sy_call_t *)compat_43_sys_accept },
+	{ SYS_compat_43_ogetpeername, 0,
+	    (sy_call_t *)compat_43_sys_getpeername },      
+	{ SYS_compat_43_ogetsockname, 0,
+	    (sy_call_t *)compat_43_sys_getsockname },
+	{ SYS_compat_43_orecv, 0, (sy_call_t *)compat_43_sys_recv },
+	{ SYS_compat_43_orecvfrom, 0, (sy_call_t *)compat_43_sys_recvfrom },
+	{ SYS_compat_43_orecvmsg, 0, (sy_call_t *)compat_43_sys_recvmsg },
+	{ SYS_compat_43_osend, 0, (sy_call_t *)compat_43_sys_send },
+	{ SYS_compat_43_osendmsg, 0, (sy_call_t *)compat_43_sys_sendmsg },
+	{ 0, 0, NULL }
+};
+
 static int compat_43_sa_put(void *);
 
 int
@@ -399,3 +416,17 @@ compat_43_sa_put(void *from)
 
 	return (0);
 }
+
+int
+uipc_syscalls_43_init(void)
+{
+
+	return syscall_establish(NULL, uipc_syscalls_43_syscalls);
+}
+
+int
+uipc_syscalls_43_fini(void)
+{
+
+	return syscall_disestablish(NULL, uipc_syscalls_43_syscalls);
+}

Index: src/sys/compat/common/vfs_syscalls_10.c
diff -u src/sys/compat/common/vfs_syscalls_10.c:1.1.2.1 src/sys/compat/common/vfs_syscalls_10.c:1.1.2.2
--- src/sys/compat/common/vfs_syscalls_10.c:1.1.2.1	Wed Mar 14 02:24:56 2018
+++ src/sys/compat/common/vfs_syscalls_10.c	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_syscalls_10.c,v 1.1.2.1 2018/03/14 02:24:56 pgoyette Exp $	*/
+/* $NetBSD: vfs_syscalls_10.c,v 1.1.2.2 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,13 +30,15 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_10.c,v 1.1.2.1 2018/03/14 02:24:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_10.c,v 1.1.2.2 2018/04/17 00:02:58 pgoyette Exp $");
  
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/namei.h>
 #include <sys/vfs_syscalls.h>
 
+#include <compat/common/compat_mod.h>
+
 static int (*orig_sys_openat_10)(struct pathbuf **);
 
 static int

Index: src/sys/compat/common/vfs_syscalls_43.c
diff -u src/sys/compat/common/vfs_syscalls_43.c:1.62.2.1 src/sys/compat/common/vfs_syscalls_43.c:1.62.2.2
--- src/sys/compat/common/vfs_syscalls_43.c:1.62.2.1	Sat Mar 31 11:45:33 2018
+++ src/sys/compat/common/vfs_syscalls_43.c	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_43.c,v 1.62.2.1 2018/03/31 11:45:33 pgoyette Exp $	*/
+/*	$NetBSD: vfs_syscalls_43.c,v 1.62.2.2 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.62.2.1 2018/03/31 11:45:33 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.62.2.2 2018/04/17 00:02:58 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -64,6 +64,8 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls
 #include <sys/resourcevar.h>
 
 #include <sys/mount.h>
+#include <sys/syscall.h>
+#include <sys/syscallvar.h>
 #include <sys/syscallargs.h>
 #include <sys/vfs_syscalls.h>
 
@@ -77,6 +79,11 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls
 static void cvttimespec(struct timespec *, struct timespec50 *);
 static void cvtstat(struct stat *, struct stat43 *);
 
+static struct syscall_package vfs_syscalls_43_syscalls[] = {
+	{ SYS_compat_43_oquota, 0, (sy_call_t *)compat_43_sys_quota },
+	{ 0, 0, NULL }
+};
+
 /*
  * Convert from an old to a new timespec structure.
  */
@@ -578,3 +585,17 @@ compat_sysctl_vfs(struct sysctllog **clo
 		       CTL_VFS, VFS_GENERIC, VFS_CONF, CTL_EOL);
 }
 #endif
+
+int
+vfs_syscalls_43_init(void)
+{
+
+	return syscall_establish(NULL, vfs_syscalls_43_syscalls);
+}
+
+int
+vfs_syscalls_43_fini(void)
+{
+
+	return syscall_disestablish(NULL, vfs_syscalls_43_syscalls);
+}

Index: src/sys/compat/common/vm_43.c
diff -u src/sys/compat/common/vm_43.c:1.20 src/sys/compat/common/vm_43.c:1.20.8.1
--- src/sys/compat/common/vm_43.c:1.20	Sat Apr 29 13:25:27 2017
+++ src/sys/compat/common/vm_43.c	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_43.c,v 1.20 2017/04/29 13:25:27 christos Exp $	*/
+/*	$NetBSD: vm_43.c,v 1.20.8.1 2018/04/17 00:02:58 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_43.c,v 1.20 2017/04/29 13:25:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_43.c,v 1.20.8.1 2018/04/17 00:02:58 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -54,10 +54,21 @@ __KERNEL_RCSID(0, "$NetBSD: vm_43.c,v 1.
 #include <sys/file.h>
 #include <sys/mman.h>
 
+#include <sys/syscall.h>
+#include <sys/syscallvar.h>
 #include <sys/syscallargs.h>
 
 #include <miscfs/specfs/specdev.h>
 
+#include <compat/common/compat_mod.h>
+
+static struct syscall_package vm_43_syscalls[] = {
+	{ SYS_compat_43_ogetpagesize, 0,
+	    (sy_call_t *)compat_43_sys_getpagesize },
+	{ SYS_compat_43_ommap, 0, (sy_call_t *)compat_43_sys_mmap },
+	{ 0, 0, NULL }
+};
+
 /* ARGSUSED */
 int
 compat_43_sys_getpagesize(struct lwp *l, const void *v, register_t *retval)
@@ -133,3 +144,17 @@ compat_43_sys_mmap(struct lwp *l, const 
 	SCARG(&nargs, pos) = SCARG(uap, pos);
 	return (sys_mmap(l, &nargs, retval));
 }
+
+int
+vm_43_init(void)
+{
+
+	return syscall_establish(NULL, vm_43_syscalls);
+}
+
+int
+vm_43_fini(void)
+{
+
+	return syscall_disestablish(NULL, vm_43_syscalls);
+}

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.202.2.18 src/sys/modules/Makefile:1.202.2.19
--- src/sys/modules/Makefile:1.202.2.18	Sat Mar 31 09:17:35 2018
+++ src/sys/modules/Makefile	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.202.2.18 2018/03/31 09:17:35 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.202.2.19 2018/04/17 00:02:58 pgoyette Exp $
 
 .include <bsd.own.mk>
 
@@ -7,9 +7,11 @@
 # Modules for compatability with earlier versions of NetBSD
 
 SUBDIR+=	compat      compat_util
-SUBDIR+=	compat_80   compat_70   compat_60   compat_50   compat_40
-SUBDIR+=	compat_30   compat_20   compat_16   compat_14   compat_13
-SUBDIR+=	compat_12   #compat_10   compat_09
+SUBDIR+=	compat_43
+SUBDIR+=	compat_09   compat_10   compat_12   compat_13   compat_14
+SUBDIR+=	compat_16   compat_20   compat_30   compat_40   compat_50
+SUBDIR+=	compat_60   compat_70   compat_80 
+
 SUBDIR+=	compat_ossaudio
 SUBDIR+=	compat_sysv
 

Index: src/sys/sys/vfs_syscalls.h
diff -u src/sys/sys/vfs_syscalls.h:1.23.2.1 src/sys/sys/vfs_syscalls.h:1.23.2.2
--- src/sys/sys/vfs_syscalls.h:1.23.2.1	Wed Mar 14 02:24:56 2018
+++ src/sys/sys/vfs_syscalls.h	Tue Apr 17 00:02:58 2018
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls.h,v 1.23.2.1 2018/03/14 02:24:56 pgoyette Exp $        */
+/*     $NetBSD: vfs_syscalls.h,v 1.23.2.2 2018/04/17 00:02:58 pgoyette Exp $        */
 
 /*
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -87,7 +87,5 @@ extern const char *const mountcompatname
 extern const int nmountcompatnames;
 
 extern int (*vec_sys_openat_10)(struct pathbuf **);
-void vfs_syscalls_10_init(void);
-void vfs_syscalls_10_fini(void);
 
 #endif /* _SYS_VFS_SYSCALLS_H_ */

Added files:

Index: src/sys/modules/compat_09/Makefile
diff -u /dev/null src/sys/modules/compat_09/Makefile:1.1.2.1
--- /dev/null	Tue Apr 17 00:02:59 2018
+++ src/sys/modules/compat_09/Makefile	Tue Apr 17 00:02:58 2018
@@ -0,0 +1,16 @@
+#	$NetBSD: Makefile,v 1.1.2.1 2018/04/17 00:02:58 pgoyette Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/compat/common
+
+KMOD=	compat_09
+
+CPPFLAGS+=	-DCOMPAT_09 -DCOMPAT_10 -DCOMPAT_12
+CPPFLAGS+=	-DCOMPAT_13 -DCOMPAT_14 -DCOMPAT_16 -DCOMPAT_20 -DCOMPAT_30
+CPPFLAGS+=	-DCOMPAT_40 -DCOMPAT_50 -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80
+
+SRCS+=	compat_09_mod.c
+SRCS+=	kern_info_09.c
+
+.include <bsd.kmodule.mk>

Index: src/sys/modules/compat_10/Makefile
diff -u /dev/null src/sys/modules/compat_10/Makefile:1.1.2.1
--- /dev/null	Tue Apr 17 00:02:59 2018
+++ src/sys/modules/compat_10/Makefile	Tue Apr 17 00:02:58 2018
@@ -0,0 +1,16 @@
+#	$NetBSD: Makefile,v 1.1.2.1 2018/04/17 00:02:58 pgoyette Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/compat/common
+
+KMOD=	compat_10
+
+CPPFLAGS+=	-DCOMPAT_10 -DCOMPAT_12
+CPPFLAGS+=	-DCOMPAT_13 -DCOMPAT_14 -DCOMPAT_16 -DCOMPAT_20 -DCOMPAT_30
+CPPFLAGS+=	-DCOMPAT_40 -DCOMPAT_50 -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80
+
+SRCS+=	compat_10_mod.c
+SRCS+=	vfs_syscalls_10.c
+
+.include <bsd.kmodule.mk>

Index: src/sys/modules/compat_43/Makefile
diff -u /dev/null src/sys/modules/compat_43/Makefile:1.1.2.1
--- /dev/null	Tue Apr 17 00:02:59 2018
+++ src/sys/modules/compat_43/Makefile	Tue Apr 17 00:02:58 2018
@@ -0,0 +1,15 @@
+#	$NetBSD: Makefile,v 1.1.2.1 2018/04/17 00:02:58 pgoyette Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/compat/common
+
+KMOD=	compat_43
+
+CPPFLAGS+=	-DCOMPAT_43
+
+SRCS=	compat_43_mod.c
+SRCS+=	kern_exit_43.c kern_info_43.c kern_resource_43.c kern_sig_43.c \
+	tty_43.c uipc_syscalls_43.c vfs_syscalls_43.c vm_43.c if_43.c
+
+.include <bsd.kmodule.mk>

Reply via email to