diff options
author | Ron Yorston <rmy@pobox.com> | 2020-06-01 08:46:17 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2020-06-01 08:46:17 +0100 |
commit | 5ea460a32a9882906c7ee3656b8fb0dcdbce2abc (patch) | |
tree | 3b6598f7f908ade15b3f61a815563e2c43502ac1 /include | |
parent | 8fdbb0564ddaf0361dff8a194a0329f86738343c (diff) | |
download | busybox-w32-5ea460a32a9882906c7ee3656b8fb0dcdbce2abc.tar.gz busybox-w32-5ea460a32a9882906c7ee3656b8fb0dcdbce2abc.tar.bz2 busybox-w32-5ea460a32a9882906c7ee3656b8fb0dcdbce2abc.zip |
win32: only initialise networking if necessary
A call to initialise networking is made during start up even if
the applet doesn't need it. Instead, only initialise networking
when a call is made to a function that definitely requires it.
Diffstat (limited to 'include')
-rw-r--r-- | include/mingw.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h index 26f0688d7..fa8f705b0 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -229,6 +229,10 @@ int mingw_accept(int sockfd1, struct sockaddr *sa, socklen_t *sz); | |||
229 | int mingw_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, | 229 | int mingw_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, |
230 | struct timeval *timeout); | 230 | struct timeval *timeout); |
231 | int mingw_getpeername(int fd, struct sockaddr *sa, socklen_t *sz); | 231 | int mingw_getpeername(int fd, struct sockaddr *sa, socklen_t *sz); |
232 | int mingw_gethostname(char *host, int namelen); | ||
233 | int mingw_getaddrinfo(const char *node, const char *service, | ||
234 | const struct addrinfo *hints, struct addrinfo **res); | ||
235 | struct hostent *mingw_gethostbyaddr(const void *addr, socklen_t len, int type); | ||
232 | 236 | ||
233 | NOIMPL(mingw_sendto,SOCKET s UNUSED_PARAM, const char *buf UNUSED_PARAM, int len UNUSED_PARAM, int flags UNUSED_PARAM, const struct sockaddr *sa UNUSED_PARAM, int salen UNUSED_PARAM); | 237 | NOIMPL(mingw_sendto,SOCKET s UNUSED_PARAM, const char *buf UNUSED_PARAM, int len UNUSED_PARAM, int flags UNUSED_PARAM, const struct sockaddr *sa UNUSED_PARAM, int salen UNUSED_PARAM); |
234 | 238 | ||
@@ -242,6 +246,9 @@ NOIMPL(mingw_sendto,SOCKET s UNUSED_PARAM, const char *buf UNUSED_PARAM, int len | |||
242 | #define accept mingw_accept | 246 | #define accept mingw_accept |
243 | #define select mingw_select | 247 | #define select mingw_select |
244 | #define getpeername mingw_getpeername | 248 | #define getpeername mingw_getpeername |
249 | #define gethostname mingw_gethostname | ||
250 | #define getaddrinfo mingw_getaddrinfo | ||
251 | #define gethostbyaddr mingw_gethostbyaddr | ||
245 | 252 | ||
246 | /* | 253 | /* |
247 | * sys/time.h | 254 | * sys/time.h |
@@ -502,7 +509,6 @@ void qsort_string_vector_case(char **sv, unsigned count) FAST_FUNC; | |||
502 | */ | 509 | */ |
503 | 510 | ||
504 | const char *get_busybox_exec_path(void); | 511 | const char *get_busybox_exec_path(void); |
505 | void init_winsock(void); | ||
506 | void init_codepage(void); | 512 | void init_codepage(void); |
507 | 513 | ||
508 | int has_bat_suffix(const char *p); | 514 | int has_bat_suffix(const char *p); |