Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sgimips/sgimips Fix build failure without options D...



details:   https://anonhg.NetBSD.org/src/rev/7a0012cc70f1
branches:  trunk
changeset: 365021:7a0012cc70f1
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Sep 02 09:57:33 2018 +0000

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

diffstat:

 sys/arch/sgimips/sgimips/machdep.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (51 lines):

diff -r 9ca928ed7c19 -r 7a0012cc70f1 sys/arch/sgimips/sgimips/machdep.c
--- a/sys/arch/sgimips/sgimips/machdep.c        Sun Sep 02 08:51:53 2018 +0000
+++ b/sys/arch/sgimips/sgimips/machdep.c        Sun Sep 02 09:57:33 2018 +0000
@@ -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 @@
        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 @@
        } 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 @@
                esym = (char *)bi_syms->esym;
                kernend = mips_round_page(esym);
        } else
-#endif
+#endif /* NKSYMS || defined(DDB) || defined(MODULAR) */
        {
                kernend = mips_round_page(end);
        }



Home | Main Index | Thread Index | Old Index