Re: r351247: buildkernel failure: error: use of undeclared identifier 'miibus_statchg_XXXX

From: David Wolfskill <david_at_catwhisker.org>
Date: Tue, 20 Aug 2019 04:26:25 -0700
On Tue, Aug 20, 2019 at 08:47:04AM +0200, O. Hartmann wrote:
> Recent CURRENT (r351247) fails to buildkernel due to a compilation error,
> pointing to an mii issue.
> 
> For almost every mii-related if_ the compiler drops an error like:
> ...
> Seems the subfolder for USB NICs is missing something?
> 
> Kind regards,
> 
> oh
> ....

I also encountered this, while attempting an update from r351211 to
r351245.

In looking over the files that were updated, I note

/usr/src/sys/dev/usb/net/usb_ethernet.h

the last update for which is:

------------------------------------------------------------------------
r351244 | stevek | 2019-08-19 18:06:43 -0700 (Mon, 19 Aug 2019) | 18 lines

usb_ethernet.h includes a number of mii headers, but only does so in
order to have struct mii_data available. However, it only really needs
a forward declaration of struct mii_data for use in pointer form for
the return type of a function prototype.

Custom kernel configuration that have usb and fdt enabled, but no miibus,
end up with compilation failures because miibus_if.h will not get
generated.

Due to the above, the following changes have been made to usb_ethernet.h:
 * remove the inclusion of mii headers
 * forward-declare struct mii_data
 * include net/ifq.h to satify the need for complete struct ifqueue

Reviewed by:    ian
Obtained from:  Juniper Networks, Inc.
Differential Revision:  https://reviews.freebsd.org/D21293

------------------------------------------------------------------------

(and, given the context, seems likely related to the observed issue).

I have attached a Meta data file.

Peace,
david
-- 
David H. Wolfskill				david_at_catwhisker.org
What, exactly, is the contribution of "health insurance" to health care?

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

Received on Tue Aug 20 2019 - 09:26:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:21 UTC