aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-06-01 08:46:17 +0100
committerRon Yorston <rmy@pobox.com>2020-06-01 08:46:17 +0100
commit5ea460a32a9882906c7ee3656b8fb0dcdbce2abc (patch)
tree3b6598f7f908ade15b3f61a815563e2c43502ac1 /include
parent8fdbb0564ddaf0361dff8a194a0329f86738343c (diff)
downloadbusybox-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.h8
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);
229int mingw_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, 229int mingw_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
230 struct timeval *timeout); 230 struct timeval *timeout);
231int mingw_getpeername(int fd, struct sockaddr *sa, socklen_t *sz); 231int mingw_getpeername(int fd, struct sockaddr *sa, socklen_t *sz);
232int mingw_gethostname(char *host, int namelen);
233int mingw_getaddrinfo(const char *node, const char *service,
234 const struct addrinfo *hints, struct addrinfo **res);
235struct hostent *mingw_gethostbyaddr(const void *addr, socklen_t len, int type);
232 236
233NOIMPL(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); 237NOIMPL(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
504const char *get_busybox_exec_path(void); 511const char *get_busybox_exec_path(void);
505void init_winsock(void);
506void init_codepage(void); 512void init_codepage(void);
507 513
508int has_bat_suffix(const char *p); 514int has_bat_suffix(const char *p);