Module Name:    src
Committed By:   rin
Date:           Tue Jun  2 02:04:35 UTC 2020

Modified Files:
        src/sys/kern: kern_timeout.c

Log Message:
Appease clang -Wtentative-definition-incomplete-type.

Now, both kernel and crash(8) build with clang for amd64
(and certainly other ports also).

Pointed out by joerg.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/kern/kern_timeout.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/kern/kern_timeout.c
diff -u src/sys/kern/kern_timeout.c:1.64 src/sys/kern/kern_timeout.c:1.65
--- src/sys/kern/kern_timeout.c:1.64	Sun May 31 23:24:20 2020
+++ src/sys/kern/kern_timeout.c	Tue Jun  2 02:04:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_timeout.c,v 1.64 2020/05/31 23:24:20 rin Exp $	*/
+/*	$NetBSD: kern_timeout.c,v 1.65 2020/06/02 02:04:35 rin Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.64 2020/05/31 23:24:20 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.65 2020/06/02 02:04:35 rin Exp $");
 
 /*
  * Timeouts are kept in a hierarchical timing wheel.  The c_time is the
@@ -104,9 +104,6 @@ __KERNEL_RCSID(0, "$NetBSD: kern_timeout
 #include <ddb/db_cpu.h>
 #include <ddb/db_sym.h>
 #include <ddb/db_output.h>
-
-static struct callout_cpu ccb;
-static struct cpu_info cib;
 #endif
 
 #define BUCKETS		1024
@@ -185,8 +182,12 @@ struct callout_cpu {
 	char		cc_name2[12];
 };
 
-#ifndef CRASH
+#ifdef DDB
+static struct callout_cpu ccb;
+static struct cpu_info cib;
+#endif
 
+#ifndef CRASH /* _KERNEL */
 static void	callout_softclock(void *);
 static void	callout_wait(callout_impl_t *, void *, kmutex_t *);
 

Reply via email to