diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 2 | ||||
-rw-r--r-- | include/mingw.h | 23 |
2 files changed, 22 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h index e82954fd0..221837b64 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -484,7 +484,6 @@ void xlisten(int s, int backlog) FAST_FUNC; | |||
484 | void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen) FAST_FUNC; | 484 | void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen) FAST_FUNC; |
485 | ssize_t xsendto(int s, const void *buf, size_t len, const struct sockaddr *to, | 485 | ssize_t xsendto(int s, const void *buf, size_t len, const struct sockaddr *to, |
486 | socklen_t tolen) FAST_FUNC; | 486 | socklen_t tolen) FAST_FUNC; |
487 | #if !ENABLE_PLATFORM_MINGW32 | ||
488 | /* SO_REUSEADDR allows a server to rebind to an address that is already | 487 | /* SO_REUSEADDR allows a server to rebind to an address that is already |
489 | * "in use" by old connections to e.g. previous server instance which is | 488 | * "in use" by old connections to e.g. previous server instance which is |
490 | * killed or crashed. Without it bind will fail until all such connections | 489 | * killed or crashed. Without it bind will fail until all such connections |
@@ -597,7 +596,6 @@ ssize_t recv_from_to(int fd, void *buf, size_t len, int flags, | |||
597 | struct sockaddr *from, | 596 | struct sockaddr *from, |
598 | struct sockaddr *to, | 597 | struct sockaddr *to, |
599 | socklen_t sa_size) FAST_FUNC; | 598 | socklen_t sa_size) FAST_FUNC; |
600 | #endif | ||
601 | 599 | ||
602 | 600 | ||
603 | char *xstrdup(const char *s) FAST_FUNC RETURNS_MALLOC; | 601 | char *xstrdup(const char *s) FAST_FUNC RETURNS_MALLOC; |
diff --git a/include/mingw.h b/include/mingw.h index 85c97b702..8927b1362 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -15,6 +15,7 @@ typedef int pid_t; | |||
15 | */ | 15 | */ |
16 | static inline unsigned int git_ntohl(unsigned int x) { return (unsigned int)ntohl(x); } | 16 | static inline unsigned int git_ntohl(unsigned int x) { return (unsigned int)ntohl(x); } |
17 | #define ntohl git_ntohl | 17 | #define ntohl git_ntohl |
18 | int inet_aton(const char *cp, struct in_addr *inp); | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * fcntl.h | 21 | * fcntl.h |
@@ -48,6 +49,19 @@ static inline void endgrent(void) {} | |||
48 | #define NAME_MAX 255 | 49 | #define NAME_MAX 255 |
49 | #define MAXSYMLINKS 20 | 50 | #define MAXSYMLINKS 20 |
50 | 51 | ||
52 | /* | ||
53 | * netdb.h | ||
54 | */ | ||
55 | |||
56 | typedef int sa_family_t; | ||
57 | |||
58 | /* | ||
59 | * linux/un.h | ||
60 | */ | ||
61 | struct sockaddr_un { | ||
62 | sa_family_t sun_family; | ||
63 | char sun_path[1]; /* to make compiler happy, don't bother */ | ||
64 | }; | ||
51 | 65 | ||
52 | /* | 66 | /* |
53 | * poll.h | 67 | * poll.h |
@@ -173,7 +187,13 @@ NOIMPL(ioctl,int fd UNUSED_PARAM, int code UNUSED_PARAM,...); | |||
173 | */ | 187 | */ |
174 | #define hstrerror strerror | 188 | #define hstrerror strerror |
175 | 189 | ||
176 | NOIMPL(mingw_socket,int domain UNUSED_PARAM, int type UNUSED_PARAM, int protocol UNUSED_PARAM); | 190 | #ifdef CONFIG_WIN32_NET |
191 | int mingw_socket(int domain, int type, int protocol); | ||
192 | int mingw_connect(int sockfd, struct sockaddr *sa, size_t sz); | ||
193 | |||
194 | # define socket mingw_socket | ||
195 | # define connect mingw_connect | ||
196 | #endif | ||
177 | 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); | 197 | 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); |
178 | NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM); | 198 | NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM); |
179 | NOIMPL(mingw_bind,SOCKET s UNUSED_PARAM,const struct sockaddr* sa UNUSED_PARAM,int salen UNUSED_PARAM); | 199 | NOIMPL(mingw_bind,SOCKET s UNUSED_PARAM,const struct sockaddr* sa UNUSED_PARAM,int salen UNUSED_PARAM); |
@@ -349,3 +369,4 @@ void free_environ(char **env); | |||
349 | char **env_setenv(char **env, const char *name); | 369 | char **env_setenv(char **env, const char *name); |
350 | 370 | ||
351 | const char *get_busybox_exec_path(void); | 371 | const char *get_busybox_exec_path(void); |
372 | void init_winsock(void); | ||