summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@univ-evry.fr>2015-01-28 15:39:44 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-01-28 21:02:21 +0100
commitfc81ae40e31cec2f20a7087dca2a70d78a5bad88 (patch)
tree334cb222d350513045cac2c27482898210847c4e /src/lib/evil
parent6f7608befd006f8076d237bee5d17c9e9e1e09ac (diff)
evil: fix initialisation of the socket library.
@fix Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/evil_unistd.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/evil/evil_unistd.c b/src/lib/evil/evil_unistd.c
index a2f8040053..71f6e2c10e 100644
--- a/src/lib/evil/evil_unistd.c
+++ b/src/lib/evil/evil_unistd.c
@@ -120,8 +120,22 @@ int
120evil_sockets_init(void) 120evil_sockets_init(void)
121{ 121{
122 WSADATA wsa_data; 122 WSADATA wsa_data;
123 WORD version;
124
125 version = MAKEWORD(2, 2);
126 if (WSAStartup(version, &wsa_data) == 0)
127 {
128 if ((LOBYTE(wsa_data.wVersion) == 2) &&
129 (HIBYTE(wsa_data.wVersion) == 2))
130 return 1;
131 else
132 {
133 WSACleanup();
134 return 0;
135 }
136 }
123 137
124 return (WSAStartup(MAKEWORD(2, 2), &wsa_data) == 0) ? 1 : 0; 138 return 0;
125} 139}
126 140
127void 141void