Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
building kernel w/ options MIIVERBOSE fails
Hi,
with current source cvs'upped an hour or so ago fails with:
...
compile vNBx64/mii_verbose.o
In file included from /u/NetBSD/src/sys/dev/mii/mii_verbose.c:62:0:
/u/NetBSD/src/sys/dev/mii/miidevs_data.h:39:21: error: array type has incomplete element type 'struct mii_knowndev'
struct mii_knowndev mii_knowndevs[] = {
^~~~~~~~~~~~~
/u/NetBSD/src/sys/dev/mii/mii_verbose.c: In function 'mii_get_descr_real':
/u/NetBSD/src/sys/dev/mii/mii_verbose.c:105:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1: all warnings being treated as errors
--- mii_verbose.o ---
*** [mii_verbose.o] Error code 1
Source of the problem are this parts of the change to mii_verbose.c
as 'struct mii_knowndev' must be defined before miidevs_data.h is
included:
@@ -55,9 +55,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mii_verbose.c,v 1.4 2019/01/08 03:14:51 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_verbose.c,v 1.5 2019/03/25 07:34:13 msaitoh Exp $");
#include <sys/module.h>
+#include <dev/mii/miidevs.h>
+#include <dev/mii/miidevs_data.h>
#include <dev/mii/mii_verbose.h>
struct mii_knowndev {
@@ -65,8 +67,6 @@
int model;
const char *descr;
};
-#include <dev/mii/miidevs.h>
-#include <dev/mii/miidevs_data.h>
const char * mii_get_descr_real(int, int);
Reverting part of the change in r1.5 like so fixes the failure:
Index: mii_verbose.c
===================================================================
RCS file: /cvsroot/src/sys/dev/mii/mii_verbose.c,v
retrieving revision 1.5
diff -u -r1.5 mii_verbose.c
--- mii_verbose.c 25 Mar 2019 07:34:13 -0000 1.5
+++ mii_verbose.c 25 Mar 2019 09:24:53 -0000
@@ -58,9 +58,8 @@
__KERNEL_RCSID(0, "$NetBSD: mii_verbose.c,v 1.5 2019/03/25 07:34:13 msaitoh Exp $");
#include <sys/module.h>
-#include <dev/mii/miidevs.h>
-#include <dev/mii/miidevs_data.h>
#include <dev/mii/mii_verbose.h>
+#include <dev/mii/miidevs.h>
struct mii_knowndev {
int oui;
@@ -68,6 +67,8 @@
const char *descr;
};
+#include <dev/mii/miidevs_data.h>
+
const char * mii_get_descr_real(int, int);
MODULE(MODULE_CLASS_MISC, miiverbose, NULL);
Kurt
Home |
Main Index |
Thread Index |
Old Index