int result;
        int addr_len;
        struct socket *sock;
-       struct timeval tv = { .tv_sec = 5, .tv_usec = 0 };
+       struct __kernel_sock_timeval tv = { .tv_sec = 5, .tv_usec = 0 };
 
        if (con->nodeid == 0) {
                log_print("attempt to connect sock 0 foiled");
         * since O_NONBLOCK argument in connect() function does not work here,
         * then, we should restore the default value of this attribute.
         */
-       kernel_setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO_OLD, (char *)&tv,
+       kernel_setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO_NEW, (char *)&tv,
                          sizeof(tv));
        result = sock->ops->connect(sock, (struct sockaddr *)&daddr, addr_len,
                                   0);
        memset(&tv, 0, sizeof(tv));
-       kernel_setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO_OLD, (char *)&tv,
+       kernel_setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO_NEW, (char *)&tv,
                          sizeof(tv));
 
        if (result == -EINPROGRESS)