Module Name:    src
Committed By:   tsutsui
Date:           Sun Sep  2 09:57:33 UTC 2018

Modified Files:
        src/sys/arch/sgimips/sgimips: machdep.c

Log Message:
Fix build failure without options DDB and with pseudo-device ksyms.

There is a typo for ksyms (NKSYMS vs NKSYM).
Also use consistent "#if NKSYMS" rather than "#if NKSYMS > 0" etc.
and add comments after corresponding #endif for readability.

Fixes PR port-sgimips/53521 from Naruaki Etomi.
Should be pulled up to (at least) netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.146 src/sys/arch/sgimips/sgimips/machdep.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/arch/sgimips/sgimips/machdep.c
diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.145 src/sys/arch/sgimips/sgimips/machdep.c:1.146
--- src/sys/arch/sgimips/sgimips/machdep.c:1.145	Mon Nov  6 03:47:48 2017
+++ src/sys/arch/sgimips/sgimips/machdep.c	Sun Sep  2 09:57:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.145 2017/11/06 03:47:48 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.146 2018/09/02 09:57:33 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.145 2017/11/06 03:47:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.146 2018/09/02 09:57:33 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -244,12 +244,12 @@ mach_init(int argc, int32_t argv32[], ui
 	vaddr_t kernend;
 	u_int i;
 	int rv;
-#if NKSYMS > 0 || defined(DDB) || defined(MODULAR)
+#if NKSYMS || defined(DDB) || defined(MODULAR)
 	int nsym = 0;
 	char *ssym = NULL;
 	char *esym = NULL;
 	struct btinfo_symtab *bi_syms;
-#endif
+#endif /* NKSYMS || defined(DDB) || defined(MODULAR) */
 #ifdef _LP64
 	char *argv[20];
 
@@ -307,7 +307,7 @@ mach_init(int argc, int32_t argv32[], ui
 	} else
 		bootinfo_msg = "no bootinfo found. (old bootblocks?)\n";
 
-#if NKSYM > 0 || defined(DDB) || defined(MODULAR)
+#if NKSYMS || defined(DDB) || defined(MODULAR)
 	bi_syms = lookup_bootinfo(BTINFO_SYMTAB);
 
 	/* check whether there is valid bootinfo symtab info */
@@ -317,7 +317,7 @@ mach_init(int argc, int32_t argv32[], ui
 		esym = (char *)bi_syms->esym;
 		kernend = mips_round_page(esym);
 	} else
-#endif
+#endif /* NKSYMS || defined(DDB) || defined(MODULAR) */
 	{
 		kernend = mips_round_page(end);
 	}

Reply via email to