aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h2
-rw-r--r--include/mingw.h23
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;
484void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen) FAST_FUNC; 484void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen) FAST_FUNC;
485ssize_t xsendto(int s, const void *buf, size_t len, const struct sockaddr *to, 485ssize_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
603char *xstrdup(const char *s) FAST_FUNC RETURNS_MALLOC; 601char *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 */
16static inline unsigned int git_ntohl(unsigned int x) { return (unsigned int)ntohl(x); } 16static inline unsigned int git_ntohl(unsigned int x) { return (unsigned int)ntohl(x); }
17#define ntohl git_ntohl 17#define ntohl git_ntohl
18int 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
56typedef int sa_family_t;
57
58/*
59 * linux/un.h
60 */
61struct 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
176NOIMPL(mingw_socket,int domain UNUSED_PARAM, int type UNUSED_PARAM, int protocol UNUSED_PARAM); 190#ifdef CONFIG_WIN32_NET
191int mingw_socket(int domain, int type, int protocol);
192int mingw_connect(int sockfd, struct sockaddr *sa, size_t sz);
193
194# define socket mingw_socket
195# define connect mingw_connect
196#endif
177NOIMPL(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); 197NOIMPL(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);
178NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM); 198NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM);
179NOIMPL(mingw_bind,SOCKET s UNUSED_PARAM,const struct sockaddr* sa UNUSED_PARAM,int salen UNUSED_PARAM); 199NOIMPL(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);
349char **env_setenv(char **env, const char *name); 369char **env_setenv(char **env, const char *name);
350 370
351const char *get_busybox_exec_path(void); 371const char *get_busybox_exec_path(void);
372void init_winsock(void);