Browse code

Fix FreeBSD

Shawn Webb authored on 2013/10/31 04:06:00
Showing 1 changed files
... ...
@@ -68,16 +68,16 @@ struct device *get_device_entry(struct device *devices, size_t *ndevices, const
68 68
     return devices;
69 69
 }
70 70
 
71
-#if HAVE_GETIFADDRS
71
+#if HAVE_GETIFADDRS && !HAVE_SYSCTLBYNAME
72 72
 struct device *get_devices(void)
73 73
 {
74 74
     struct ifaddrs *addrs, *addr;
75 75
     struct device *devices=NULL, *device=NULL;
76 76
     size_t ndevices=0, i;
77
-    struct ifreq ifr;
78 77
     void *p;
79 78
     uint8_t *mac;
80 79
     int sock;
80
+    struct ifreq ifr;
81 81
 
82 82
     if (getifaddrs(&addrs))
83 83
         return NULL;