]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/inet_pton.c
remap: fix build for non-x86 builds
[pulseaudio] / src / pulsecore / inet_pton.c
index 42bb5387924e2c67b77dd291dd4275c29e260c9d..abdfa46731ce6c9203fbaa7706417119054fafc0 100644 (file)
@@ -1,8 +1,8 @@
-/* $Id$ */
-
 /***
   This file is part of PulseAudio.
 
+  Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
+
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1 of the
@@ -25,7 +25,6 @@
 
 #include <stdio.h>
 #include <errno.h>
-#include <assert.h>
 
 #ifndef HAVE_INET_PTON
 
@@ -39,7 +38,9 @@
 
 int inet_pton(int af, const char *src, void *dst) {
     struct in_addr *in = (struct in_addr*)dst;
+#ifdef HAVE_IPV6
     struct in6_addr *in6 = (struct in6_addr*)dst;
+#endif
 
     assert(src && dst);
 
@@ -49,8 +50,10 @@ int inet_pton(int af, const char *src, void *dst) {
         if (in->s_addr == INADDR_NONE)
             return 0;
         break;
+#ifdef HAVE_IPV6
     case AF_INET6:
         /* FIXME */
+#endif
     default:
         errno = EAFNOSUPPORT;
         return -1;