From: Barak A. Pearlmutter Date: Thu, 1 Sep 2011 11:48:57 +0000 (+0100) Subject: guard use of IP_RECVTOS which is unavailable on kfreebsd X-Git-Tag: liboping-1.6.2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=773dbf0378e896f0203ce5d79cccfe86c54512b2;p=liboping.git guard use of IP_RECVTOS which is unavailable on kfreebsd --- diff --git a/src/liboping.c b/src/liboping.c index 83ca9c2..76a7d53 100644 --- a/src/liboping.c +++ b/src/liboping.c @@ -1540,10 +1540,12 @@ int ping_host_add (pingobj_t *obj, const char *host) { int opt; +#ifdef IP_RECVTOS /* Enable receiving the TOS field */ opt = 1; setsockopt (ph->fd, IPPROTO_IP, IP_RECVTOS, &opt, sizeof (opt)); +#endif /* IP_RECVTOS */ /* Enable receiving the TTL field */ opt = 1;