Wrap the new world order in __FreeBSD__ to ease future imports.

This commit is contained in:
Max Laier 2005-08-09 11:59:02 +00:00
parent fff86fc443
commit ef2e5f06f2
2 changed files with 14 additions and 0 deletions

View File

@ -271,10 +271,17 @@ pflogioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCAIFADDR:
case SIOCSIFDSTADDR:
case SIOCSIFFLAGS:
#ifdef __FreeBSD__
if (ifp->if_flags & IFF_UP)
ifp->if_drv_flags |= IFF_DRV_RUNNING;
else
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
#else
if (ifp->if_flags & IFF_UP)
ifp->if_flags |= IFF_RUNNING;
else
ifp->if_flags &= ~IFF_RUNNING;
#endif
break;
default:
return (EINVAL);

View File

@ -989,10 +989,17 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCAIFADDR:
case SIOCSIFDSTADDR:
case SIOCSIFFLAGS:
#ifdef __FreeBSD__
if (ifp->if_flags & IFF_UP)
ifp->if_drv_flags |= IFF_DRV_RUNNING;
else
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
#else
if (ifp->if_flags & IFF_UP)
ifp->if_flags |= IFF_RUNNING;
else
ifp->if_flags &= ~IFF_RUNNING;
#endif
break;
case SIOCSIFMTU:
if (ifr->ifr_mtu < PFSYNC_MINMTU)