]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Build fixes for only INET and only INET6
authorRoy Marples <roy@marples.name>
Thu, 14 Nov 2013 15:48:07 +0000 (15:48 +0000)
committerRoy Marples <roy@marples.name>
Thu, 14 Nov 2013 15:48:07 +0000 (15:48 +0000)
ipv4.h
net.c

diff --git a/ipv4.h b/ipv4.h
index ebab2cd35b8f7228887b3b2c772645a10194ff1e..bf85294b4bfdeeedf386236b051d9df8a5e8b549 100644 (file)
--- a/ipv4.h
+++ b/ipv4.h
@@ -97,9 +97,11 @@ ssize_t ipv4_sendrawpacket(const struct interface *,
 ssize_t ipv4_getrawpacket(struct interface *, int, void *, ssize_t, int *);
 void ipv4_free(struct interface *);
 #else
-#define ipv4_init() -1
+#define ipv4_init() (-1)
 #define ipv4_applyaddr(a) {}
 #define ipv4_freeroutes(a) {}
+#define ipv4_free(a) {}
+#define ipv4_addrexists(a) (0)
 #endif
 
 #endif
diff --git a/net.c b/net.c
index 2b7e6120b46c114939c5e9561f9baaf65926c320..390fff9f1f7aeb8f45da1c24be6f73b936c9d56d 100644 (file)
--- a/net.c
+++ b/net.c
@@ -230,6 +230,7 @@ discover_interfaces(int argc, char * const *argv)
        const struct sockaddr_in *addr;
        const struct sockaddr_in *net;
        const struct sockaddr_in *dst;
+#endif
 #ifdef INET6
        const struct sockaddr_in6 *sin6;
        int ifa_flags;
@@ -487,7 +488,6 @@ discover_interfaces(int argc, char * const *argv)
 #endif
                }
        }
-#endif
 
        freeifaddrs(ifaddrs);