From 86d6ba077b8d183914eec1f970ddaf077b574f4b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:07:24 +0000 Subject: provide switches for TCP and unix sockets autoconf flags for enabling and disabling TCP and unix domain socket support. Embedded machines without a TCP stack may be better off without TCP support. git-svn-id: https://svn.musicpd.org/mpd/trunk@7236 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/interface.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/interface.c') diff --git a/src/interface.c b/src/interface.c index 43c8b3654..df9eb63f7 100644 --- a/src/interface.c +++ b/src/interface.c @@ -245,6 +245,7 @@ void openAInterface(int fd, struct sockaddr *addr) } else { const char *hostname; switch (addr->sa_family) { +#ifdef HAVE_TCP case AF_INET: hostname = (const char *)inet_ntoa(((struct sockaddr_in *) addr)->sin_addr); @@ -267,9 +268,12 @@ void openAInterface(int fd, struct sockaddr *addr) } break; #endif +#endif /* HAVE_TCP */ +#ifdef HAVE_UN case AF_UNIX: hostname = "local connection"; break; +#endif /* HAVE_UN */ default: hostname = "unknown"; } -- cgit v1.2.3