projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f7608b
)
evil: fix initialisation of the socket library.
author
Vincent Torri
<vincent.torri@univ-evry.fr>
Wed, 28 Jan 2015 14:39:44 +0000
(15:39 +0100)
committer
Cedric BAIL
<cedric@osg.samsung.com>
Wed, 28 Jan 2015 20:02:21 +0000
(21:02 +0100)
@fix
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/evil/evil_unistd.c
patch
|
blob
|
history
diff --git
a/src/lib/evil/evil_unistd.c
b/src/lib/evil/evil_unistd.c
index
a2f8040
..
71f6e2c
100644
(file)
--- a/
src/lib/evil/evil_unistd.c
+++ b/
src/lib/evil/evil_unistd.c
@@
-120,8
+120,22
@@
int
evil_sockets_init(void)
{
WSADATA wsa_data;
+ WORD version;
+
+ version = MAKEWORD(2, 2);
+ if (WSAStartup(version, &wsa_data) == 0)
+ {
+ if ((LOBYTE(wsa_data.wVersion) == 2) &&
+ (HIBYTE(wsa_data.wVersion) == 2))
+ return 1;
+ else
+ {
+ WSACleanup();
+ return 0;
+ }
+ }
- return
(WSAStartup(MAKEWORD(2, 2), &wsa_data) == 0) ? 1 :
0;
+ return 0;
}
void