aboutsummaryrefslogtreecommitdiffstats
path: root/src/listen.c
diff options
context:
space:
mode:
authorSean McNamara <smcnam@gmail.com>2009-03-27 12:24:16 -0400
committerMax Kellermann <max@duempel.org>2009-03-27 18:02:56 +0100
commitb1e0bde5298e738632af1229896d391aec8d5c3f (patch)
tree8bf2e72f663470f65b4f9d297dc40d74cc5098e1 /src/listen.c
parent9c63ffa546e0dff29252294c0cd310b2ecfa8531 (diff)
downloadmpd-b1e0bde5298e738632af1229896d391aec8d5c3f.tar.gz
mpd-b1e0bde5298e738632af1229896d391aec8d5c3f.tar.xz
mpd-b1e0bde5298e738632af1229896d391aec8d5c3f.zip
Uniform getaddrinfo() on WIN32 or POSIX, because MinGW now supports it
Diffstat (limited to 'src/listen.c')
-rw-r--r--src/listen.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/listen.c b/src/listen.c
index e4d8ea796..0505cff16 100644
--- a/src/listen.c
+++ b/src/listen.c
@@ -213,7 +213,6 @@ static bool
listen_add_host(const char *hostname, unsigned port, GError **error)
{
#ifdef HAVE_TCP
-#ifndef WIN32
struct addrinfo hints, *ai, *i;
char service[20];
int ret;
@@ -250,28 +249,6 @@ listen_add_host(const char *hostname, unsigned port, GError **error)
freeaddrinfo(ai);
return true;
-#else /* WIN32 */
- const struct hostent *he;
-
- g_debug("binding to address for %s", hostname);
-
- he = gethostbyname(hostname);
- if (he == NULL) {
- g_set_error(error, listen_quark(), 0,
- "Failed to look up host \"%s\"", hostname);
- return false;
- }
-
- if (he->h_addrtype != AF_INET) {
- g_set_error(error, listen_quark(), 0,
- "IPv4 address expected for host \"%s\"",
- hostname);
- return false;
- }
-
- return listen_add_address(AF_INET, he->h_addr, he->h_length,
- error);
-#endif /* !WIN32 */
#else /* HAVE_TCP */
(void)hostname;