1 --- src/interface.c.orig 2007-03-23 13:29:40.000000000 +0000
2 +++ src/interface.c 2007-03-23 13:30:05.000000000 +0000
5 interface_status_t interface_detect_beat_mii(int fd, char *iface) {
12 if (interface_auto_up)
13 interface_up(fd, iface);
18 - ((unsigned short*) &ifr.ifr_data)[1] = 1;
19 + ifd.data = &ifr.ifr_data;
22 if (ioctl(fd, SIOCGMIIREG, &ifr) == -1) {
23 if (interface_do_message)
28 - return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
30 + return (*ifd.usz & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
33 interface_status_t interface_detect_beat_priv(int fd, char *iface) {
38 + unsigned short *usz;
41 if (interface_auto_up)
42 interface_up(fd, iface);
48 - ((unsigned short*) &ifr.ifr_data)[1] = 1;
49 + ifd.data = &ifr.ifr_data;
52 if (ioctl(fd, SIOCDEVPRIVATE+1, &ifr) == -1) {
53 if (interface_do_message)
58 - return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
60 + return (*ifd.usz & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
63 interface_status_t interface_detect_beat_ethtool(int fd, char *iface) {