]> granicus.if.org Git - libevent/commitdiff
sample/http-connect: fix compilation with VS2010
authorAzat Khuzhin <a3at.mail@gmail.com>
Tue, 6 Dec 2016 06:54:13 +0000 (09:54 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Tue, 6 Dec 2016 06:57:16 +0000 (09:57 +0300)
Fixes: nmathewson/Libevent#137
sample/http-connect.c

index d6c7b5ea0bc41ef4d84ede3369ed2c03a1ca5af2..a44d001ac71fa4ac50e90951b1276e179eb1a9ed 100644 (file)
@@ -97,10 +97,8 @@ int main(int argc, const char **argv)
        VERIFY(base = event_base_new());
        VERIFY(evcon = evhttp_connection_base_new(base, NULL,
                evhttp_uri_get_host(proxy), evhttp_uri_get_port(proxy)));
-       connect_base = (struct connect_base){
-               .evcon = evcon,
-               .location = location,
-       };
+       connect_base.evcon = evcon;
+       connect_base.location = location;
        VERIFY(req = evhttp_request_new(connect_cb, &connect_base));
 
        evhttp_add_header(req->output_headers, "Connection", "keep-alive");