Module Name:    src
Committed By:   maxv
Date:           Fri Jul 11 16:22:49 UTC 2014

Modified Files:
        src/sys/compat/netbsd32: netbsd32_mod.c

Log Message:
netbsd32 should depend on exec_elf32, since it will use exec_elf32's functions.
This fixes
        # modload compat_netbsd32
when exec_elf32 is not loaded.

ok njoly@


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/netbsd32/netbsd32_mod.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/netbsd32/netbsd32_mod.c
diff -u src/sys/compat/netbsd32/netbsd32_mod.c:1.3 src/sys/compat/netbsd32/netbsd32_mod.c:1.4
--- src/sys/compat/netbsd32/netbsd32_mod.c:1.3	Fri Mar  7 01:33:43 2014
+++ src/sys/compat/netbsd32/netbsd32_mod.c	Fri Jul 11 16:22:49 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_mod.c,v 1.3 2014/03/07 01:33:43 christos Exp $	*/
+/*	$NetBSD: netbsd32_mod.c,v 1.4 2014/07/11 16:22:49 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,13 +30,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.3 2014/03/07 01:33:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.4 2014/07/11 16:22:49 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
-#define	MODDEPS	"compat"
+# define	DEPS1	"compat"
 #else
-#define	MODDEPS	"compat,ksem"
+# define	DEPS1	"compat,ksem"
 #endif
 
 #ifndef ELFSIZE
@@ -51,10 +51,16 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_mod
 #include <compat/netbsd32/netbsd32_sysctl.h>
 #include <compat/netbsd32/netbsd32_exec.h>
 
+#if defined(EXEC_ELF32)
+# define	DEPS2	",exec_elf32"
+#else
+# define	DEPS2	""
+#endif
+
 #define ELF32_AUXSIZE (howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), \
     sizeof(Elf32_Addr)) + MAXPATHLEN + ALIGN(1))
 
-MODULE(MODULE_CLASS_EXEC, compat_netbsd32, MODDEPS);
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32, DEPS1 DEPS2);
 
 static struct execsw netbsd32_execsw[] = {
 #ifdef EXEC_AOUT

Reply via email to