From d89fdba424c654445d0f927670691d9b55f20846 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 5 Jul 2010 12:28:22 -0400 Subject: [PATCH] Make sample/hello_world work on windows We forgot to include the WSAStartup call in main(). Patch from an anonymous user on Sourceforge. Fixes bug 3025354. --- sample/hello-world.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sample/hello-world.c b/sample/hello-world.c index d0426993..90df85f7 100644 --- a/sample/hello-world.c +++ b/sample/hello-world.c @@ -38,9 +38,12 @@ main(int argc, char **argv) struct event_base *base; struct evconnlistener *listener; struct event *signal_event; - // struct sockaddr_storage ss; struct sockaddr_in sin; +#ifdef WIN32 + WSADATA wsa_data; + WSAStartup(0x0201, &wsa_data); +#endif base = event_base_new(); if (!base) {