From 5e9c1c28c6959a814818c7f3614ef84cadccf1c8 Mon Sep 17 00:00:00 2001
From: Bastien Nocera
Date: Mon, 21 Jun 2010 15:59:21 +0100
Subject: 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.
---
 libusbmuxd/sock_stuff.c | 2 ++
 libusbmuxd/sock_stuff.h | 2 ++
 2 files changed, 4 insertions(+)

(limited to 'libusbmuxd')

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)
 	return sfd;
 }
 
+#if defined(WIN32) || defined(__CYGWIN__)
 int connect_socket(const char *addr, uint16_t port)
 {
 	int sfd = -1;
@@ -251,6 +252,7 @@ int connect_socket(const char *addr, uint16_t port)
 
 	return sfd;
 }
+#endif /* WIN32 || __CYGWIN__ */
 
 int check_fd(int fd, fd_mode fdm, unsigned int timeout)
 {
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);
 int connect_unix_socket(const char *filename);
 #endif
 int create_socket(uint16_t port);
+#if defined(WIN32) || defined(__CYGWIN__)
 int connect_socket(const char *addr, uint16_t port);
+#endif
 int check_fd(int fd, fd_mode fdm, unsigned int timeout);
 
 int recv_buf(int fd, void *data, size_t size);
-- 
cgit v1.1-32-gdbae