diff options
| author | 2010-06-21 15:59:21 +0100 | |
|---|---|---|
| committer | 2010-06-25 16:47:55 +0200 | |
| commit | 5e9c1c28c6959a814818c7f3614ef84cadccf1c8 (patch) | |
| tree | 98a6b94e6245a7a7403aa711743bfc7872cc3f03 | |
| parent | 3ea39bc9c977ddbbcb168f79505e0856942a259d (diff) | |
| download | usbmuxd-5e9c1c28c6959a814818c7f3614ef84cadccf1c8.tar.gz usbmuxd-5e9c1c28c6959a814818c7f3614ef84cadccf1c8.tar.bz2 | |
Don't export gethostbyname() use on non-Windows
This triggers warnings in the Red Hat test suite about IPv6 support.
The easiest is to not compile that code, which will end up unused
on Linux or MacOS X anyway.
| -rw-r--r-- | libusbmuxd/sock_stuff.c | 2 | ||||
| -rw-r--r-- | libusbmuxd/sock_stuff.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libusbmuxd/sock_stuff.c b/libusbmuxd/sock_stuff.c index 0592f6b..302b53a 100644 --- a/libusbmuxd/sock_stuff.c +++ b/libusbmuxd/sock_stuff.c | |||
| @@ -192,6 +192,7 @@ int create_socket(uint16_t port) | |||
| 192 | return sfd; | 192 | return sfd; |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | #if defined(WIN32) || defined(__CYGWIN__) | ||
| 195 | int connect_socket(const char *addr, uint16_t port) | 196 | int connect_socket(const char *addr, uint16_t port) |
| 196 | { | 197 | { |
| 197 | int sfd = -1; | 198 | int sfd = -1; |
| @@ -251,6 +252,7 @@ int connect_socket(const char *addr, uint16_t port) | |||
| 251 | 252 | ||
| 252 | return sfd; | 253 | return sfd; |
| 253 | } | 254 | } |
| 255 | #endif /* WIN32 || __CYGWIN__ */ | ||
| 254 | 256 | ||
| 255 | int check_fd(int fd, fd_mode fdm, unsigned int timeout) | 257 | int check_fd(int fd, fd_mode fdm, unsigned int timeout) |
| 256 | { | 258 | { |
diff --git a/libusbmuxd/sock_stuff.h b/libusbmuxd/sock_stuff.h index 5405b04..db90385 100644 --- a/libusbmuxd/sock_stuff.h +++ b/libusbmuxd/sock_stuff.h | |||
| @@ -38,7 +38,9 @@ int create_unix_socket(const char *filename); | |||
| 38 | int connect_unix_socket(const char *filename); | 38 | int connect_unix_socket(const char *filename); |
| 39 | #endif | 39 | #endif |
| 40 | int create_socket(uint16_t port); | 40 | int create_socket(uint16_t port); |
| 41 | #if defined(WIN32) || defined(__CYGWIN__) | ||
| 41 | int connect_socket(const char *addr, uint16_t port); | 42 | int connect_socket(const char *addr, uint16_t port); |
| 43 | #endif | ||
| 42 | int check_fd(int fd, fd_mode fdm, unsigned int timeout); | 44 | int check_fd(int fd, fd_mode fdm, unsigned int timeout); |
| 43 | 45 | ||
| 44 | int recv_buf(int fd, void *data, size_t size); | 46 | int recv_buf(int fd, void *data, size_t size); |
