From 88bc82aaa517ec8bc3484e6853ca09762bd1a361 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 15 Jul 2009 11:33:33 +0200 Subject: [PATCH] src/liboping.c: Check if IPPROTO_IPV6 and IPV6_RECVHOPLIMIT are defined. --- src/liboping.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/liboping.c b/src/liboping.c index 88244bb..51071ad 100644 --- a/src/liboping.c +++ b/src/liboping.c @@ -1352,6 +1352,7 @@ int ping_host_add (pingobj_t *obj, const char *host) setsockopt (ph->fd, IPPROTO_IP, IP_RECVTTL, &opt, sizeof (opt)); } +#if defined(IPPROTO_IPV6) && defined(IPV6_RECVHOPLIMIT) else if (ph->addrfamily == AF_INET6) { int opt = 1; @@ -1359,6 +1360,7 @@ int ping_host_add (pingobj_t *obj, const char *host) setsockopt (ph->fd, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &opt, sizeof (opt)); } +#endif break; } -- 2.30.2