From: Guus Sliepen Date: Sun, 27 Nov 2011 11:12:34 +0000 (+0100) Subject: Fix compilation of VDE and UML interfaces. X-Git-Tag: release-1.0.17~28 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=2c7c87ec75c94d0b3cca9f7a5aeba34384f77cc1;p=tinc Fix compilation of VDE and UML interfaces. --- diff --git a/src/uml_socket/device.c b/src/uml_socket/device.c index a2da7575..a371e7b4 100644 --- a/src/uml_socket/device.c +++ b/src/uml_socket/device.c @@ -28,6 +28,7 @@ #include "logger.h" #include "utils.h" #include "route.h" +#include "xalloc.h" int device_fd = -1; static int listen_fd = -1; @@ -40,7 +41,7 @@ char *iface = NULL; static char *device_info; extern char *identname; -extern bool running; +extern volatile bool running; static uint64_t device_total_in = 0; static uint64_t device_total_out = 0; @@ -175,7 +176,7 @@ bool read_packet(vpn_packet_t *packet) { switch(state) { case 0: { struct sockaddr sa; - int salen = sizeof sa; + socklen_t salen = sizeof sa; request_fd = accept(listen_fd, &sa, &salen); if(request_fd < 0) { @@ -244,6 +245,10 @@ bool read_packet(vpn_packet_t *packet) { return true; } + + default: + logger(LOG_ERR, "Invalid value for state variable in " __FILE__); + abort(); } } diff --git a/src/vde/device.c b/src/vde/device.c index 63171f9a..74cf3b67 100644 --- a/src/vde/device.c +++ b/src/vde/device.c @@ -39,7 +39,7 @@ char *iface = NULL; static char *device_info; extern char *identname; -extern bool running; +extern volatile bool running; static uint64_t device_total_in = 0; static uint64_t device_total_out = 0;