git: 5684c8783b64 - main - qlnxe: Add missing #ifdef INET to fix amd64 LINT-NOINET/NOIP builds
Date: Fri, 07 Jul 2023 23:54:37 UTC
The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=5684c8783b64e33f0dab058126b36776adcc8e82 commit 5684c8783b64e33f0dab058126b36776adcc8e82 Author: Jessica Clarke <jrtc27@FreeBSD.org> AuthorDate: 2023-07-07 23:54:07 +0000 Commit: Jessica Clarke <jrtc27@FreeBSD.org> CommitDate: 2023-07-07 23:54:07 +0000 qlnxe: Add missing #ifdef INET to fix amd64 LINT-NOINET/NOIP builds The approach here is copied directly from qlxgb. Fixes: b0d3d44dfe63 ("qlnxe: add driver to amd64 NOTES") --- sys/dev/qlnx/qlnxe/qlnx_os.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 135aea62c05b..e8bb373fbab4 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2634,7 +2634,9 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) { int ret = 0, mask; struct ifreq *ifr = (struct ifreq *)data; +#ifdef INET struct ifaddr *ifa = (struct ifaddr *)data; +#endif qlnx_host_t *ha; ha = (qlnx_host_t *)if_getsoftc(ifp); @@ -2643,6 +2645,7 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) case SIOCSIFADDR: QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx)\n", cmd); +#ifdef INET if (ifa->ifa_addr->sa_family == AF_INET) { if_setflagbits(ifp, IFF_UP, 0); if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) { @@ -2654,9 +2657,10 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr)); arp_ifinit(ifp, ifa); - } else { - ether_ioctl(ifp, cmd, data); + break; } +#endif + ether_ioctl(ifp, cmd, data); break; case SIOCSIFMTU: