[Bug 262116] stable/13 kernel rtwn_usb module build error

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 22 Feb 2022 05:41:17 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262116

            Bug ID: 262116
           Summary: stable/13 kernel rtwn_usb module build error
           Product: Base System
           Version: 13.0-STABLE
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: ota@j.email.ne.jp

i386 compilation of stable/13 results error as below.
amd64 does not produce this error on stable/13.
i386 on current does not produce this error, neither.

I suppose there was a fix committed to the main branch but not yet merged to
stable/13.

git rev cc6f50fc371f6a04fd20dd4f4d08e5d3fcdf6319

% make -C /usr/src buildkernel
In file included from /usr/src/sys/dev/rtwn/usb/rtwn_usb_attach.c:55:
/usr/src/sys/dev/rtwn/usb/rtwn_usb_attach.h:123:2: error: use of undeclared
identifier 'USB_PRODUCT_EDIMAX_EW7811UN_V2'
        RTWN_RTL8188EU_DEV(EDIMAX,              EW7811UN_V2),
        ^
/usr/src/sys/dev/rtwn/usb/rtwn_usb_attach.h:118:28: note: expanded from macro
'RTWN_RTL8188EU_DEV'
        { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, RTWN_CHIP_RTL8188EU) }
                                  ^
<scratch space>:10:1: note: expanded from here
USB_PRODUCT_EDIMAX_EW7811UN_V2
^
In file included from /usr/src/sys/dev/rtwn/usb/rtwn_usb_attach.c:55:
/usr/src/sys/dev/rtwn/usb/rtwn_usb_attach.h:148:2: error: use of undeclared
identifier 'USB_VENDOR_TENDA2'
        RTWN_RTL8812AU_DEV(TENDA2,              U12),
        ^
/usr/src/sys/dev/rtwn/usb/rtwn_usb_attach.h:134:12: note: expanded from macro
'RTWN_RTL8812AU_DEV'
        { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, RTWN_CHIP_RTL8812AU) }
                  ^
<scratch space>:87:1: note: expanded from here
USB_VENDOR_TENDA2
^
In file included from /usr/src/sys/dev/rtwn/usb/rtwn_usb_attach.c:55:
/usr/src/sys/dev/rtwn/usb/rtwn_usb_attach.h:148:2: error: use of undeclared
identifier 'USB_PRODUCT_TENDA2_U12'
/usr/src/sys/dev/rtwn/usb/rtwn_usb_attach.h:134:28: note: expanded from macro
'RTWN_RTL8812AU_DEV'
        { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, RTWN_CHIP_RTL8812AU) }
                                  ^
<scratch space>:90:1: note: expanded from here
USB_PRODUCT_TENDA2_U12
^
/usr/src/sys/dev/rtwn/usb/rtwn_usb_attach.c:103:49: error: invalid application
of 'sizeof' to an incomplete type 'const struct usb_device_id []'
        return (usbd_lookup_id_by_uaa(rtwn_devs, sizeof(rtwn_devs), uaa));
                                                       ^~~~~~~~~~~
/usr/src/sys/dev/rtwn/usb/rtwn_usb_attach.c:490:1: error: invalid application
of 'sizeof' to an incomplete type 'const struct usb_device_id []'
USB_PNP_HOST_INFO(rtwn_devs);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/dev/usb/usbdi.h:346:12: note: expanded from macro
'USB_PNP_HOST_INFO'
            sizeof(table) / sizeof(table[0]))
            ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/sys/module.h:187:16: note: expanded from macro 'MODULE_PNP_INFO'
                .num_entry = n                                          \
                             ^
5 errors generated.
*** [rtwn_usb_attach.o] Error code 1

make[4]: stopped in /usr/src/sys/modules/rtwn_usb
1 error

make[4]: stopped in /usr/src/sys/modules/rtwn_usb

make[3]: stopped in /usr/src/sys/modules

-- 
You are receiving this mail because:
You are the assignee for the bug.