]> git.meshlink.io Git - meshlink/commitdiff
Fix check for raw socket support.
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 21 Feb 2012 13:06:55 +0000 (14:06 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 21 Feb 2012 13:06:55 +0000 (14:06 +0100)
Also, move some variables so there are no compiler warnings about unused
variables when there is no support for raw sockets.

src/raw_socket_device.c

index b9671e3e512b891522b9a8d5e950e4e109861e8e..1dd726f888de2d172efb9b7a8eeea2f7efaa9f29 100644 (file)
 #include "route.h"
 #include "xalloc.h"
 
+#if defined(PF_PACKET) && defined(ETH_P_ALL) && defined(AF_PACKET)
 static char *device_info;
 
 static uint64_t device_total_in = 0;
 static uint64_t device_total_out = 0;
 
-#if defined(PF_SOCKET) && defined(ETH_P_ALL) && defined(AF_PACKET)
 static bool setup_device(void) {
        struct ifreq ifr;
        struct sockaddr_ll sa;