diff options
Diffstat (limited to 'os/windows')
-rwxr-xr-x | os/windows/posix.c | 2 | ||||
-rw-r--r-- | os/windows/posix/include/arpa/inet.h | 2 | ||||
-rw-r--r-- | os/windows/posix/include/poll.h | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/os/windows/posix.c b/os/windows/posix.c index ecc8c408..d33250de 100755 --- a/os/windows/posix.c +++ b/os/windows/posix.c @@ -959,6 +959,7 @@ in_addr_t inet_network(const char *cp) return hbo; } +#ifdef CONFIG_WINDOWS_XP const char* inet_ntop(int af, const void *restrict src, char *restrict dst, socklen_t size) { @@ -1039,3 +1040,4 @@ int inet_pton(int af, const char *restrict src, void *restrict dst) return ret; } +#endif /* CONFIG_WINDOWS_XP */ diff --git a/os/windows/posix/include/arpa/inet.h b/os/windows/posix/include/arpa/inet.h index 30498c67..056f1dd5 100644 --- a/os/windows/posix/include/arpa/inet.h +++ b/os/windows/posix/include/arpa/inet.h @@ -12,8 +12,10 @@ typedef int in_addr_t; in_addr_t inet_network(const char *cp); +#ifdef CONFIG_WINDOWS_XP const char *inet_ntop(int af, const void *restrict src, char *restrict dst, socklen_t size); int inet_pton(int af, const char *restrict src, void *restrict dst); +#endif #endif /* ARPA_INET_H */ diff --git a/os/windows/posix/include/poll.h b/os/windows/posix/include/poll.h index 21e5699b..25b8183f 100644 --- a/os/windows/posix/include/poll.h +++ b/os/windows/posix/include/poll.h @@ -1,8 +1,11 @@ #ifndef POLL_H #define POLL_H +#include <winsock2.h> + typedef int nfds_t; +#ifdef CONFIG_WINDOWS_XP struct pollfd { int fd; @@ -10,11 +13,12 @@ struct pollfd short revents; }; -int poll(struct pollfd fds[], nfds_t nfds, int timeout); - #define POLLOUT 1 #define POLLIN 2 #define POLLERR 0 #define POLLHUP 1 +#endif /* CONFIG_WINDOWS_XP */ + +int poll(struct pollfd fds[], nfds_t nfds, int timeout); #endif /* POLL_H */ |