From: Florian Forster Date: Wed, 15 Jul 2009 09:33:33 +0000 (+0200) Subject: src/liboping.c: Check if IPPROTO_IPV6 and IPV6_RECVHOPLIMIT are defined. X-Git-Tag: liboping-1.2.0~6 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=88bc82aaa517ec8bc3484e6853ca09762bd1a361;p=liboping.git src/liboping.c: Check if IPPROTO_IPV6 and IPV6_RECVHOPLIMIT are defined. --- 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; }