IFF_DYNAMIC not defined in linux 2.2 kernel

This commit is contained in:
Doug MacEachern 2009-08-12 10:07:08 -07:00
parent 6f75fc0668
commit a77d7ef04f
1 changed files with 3 additions and 0 deletions

View File

@ -1548,6 +1548,9 @@ int sigar_net_interface_config_get(sigar_t *sigar, const char *name,
if (!ioctl(sock, SIOCGIFFLAGS, &ifr)) { if (!ioctl(sock, SIOCGIFFLAGS, &ifr)) {
sigar_uint64_t flags = ifr.ifr_flags; sigar_uint64_t flags = ifr.ifr_flags;
#ifdef __linux__ #ifdef __linux__
# ifndef IFF_DYNAMIC
# define IFF_DYNAMIC 0x8000 /* not in 2.2 kernel */
# endif /* IFF_DYNAMIC */
int is_mcast = flags & IFF_MULTICAST; int is_mcast = flags & IFF_MULTICAST;
int is_slave = flags & IFF_SLAVE; int is_slave = flags & IFF_SLAVE;
int is_master = flags & IFF_MASTER; int is_master = flags & IFF_MASTER;