aboutsummaryrefslogtreecommitdiff
path: root/win32/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/net.c')
-rw-r--r--win32/net.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/win32/net.c b/win32/net.c
index 93e19ae5c..82c29e57c 100644
--- a/win32/net.c
+++ b/win32/net.c
@@ -9,3 +9,12 @@ int inet_aton(const char *cp, struct in_addr *inp)
9 inp->S_un.S_addr = val; 9 inp->S_un.S_addr = val;
10 return 1; 10 return 1;
11} 11}
12
13void init_winsock(void)
14{
15 WSADATA wsa;
16 if (WSAStartup(MAKEWORD(2,2), &wsa))
17 bb_error_msg_and_die("unable to initialize winsock subsystem, error %d",
18 WSAGetLastError());
19 atexit((void(*)(void)) WSACleanup); /* may conflict with other atexit? */
20}