Give getsockopt() a reference to a socklen_t.
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 28 Jun 2014 19:54:34 +0000 (21:54 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 28 Jun 2014 19:54:34 +0000 (21:54 +0200)
src/net_socket.c

index 3b6399b..b2297af 100644 (file)
@@ -421,7 +421,7 @@ static void handle_meta_io(void *data, int flags) {
                        if (!socknotconn(sockerrno))
                                socket_error = sockerrno;
                        else {
-                               int len = sizeof socket_error;
+                               socklen_t len = sizeof socket_error;
                                getsockopt(c->socket, SOL_SOCKET, SO_ERROR, (void *)&socket_error, &len);
                        }
                        if (socket_error) {