Skip to content

Commit

Permalink
qlnxe: Add missing #ifdef INET to fix amd64 LINT-NOINET/NOIP builds
Browse files Browse the repository at this point in the history
The approach here is copied directly from qlxgb.

Fixes:	b0d3d44 ("qlnxe: add driver to amd64 NOTES")
  • Loading branch information
jrtc27 committed Jul 7, 2023
1 parent 406ff3d commit 5684c87
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sys/dev/qlnx/qlnxe/qlnx_os.c
Expand Up @@ -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);
Expand All @@ -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)) {
Expand All @@ -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:
Expand Down

0 comments on commit 5684c87

Please sign in to comment.