From 773dbf0378e896f0203ce5d79cccfe86c54512b2 Mon Sep 17 00:00:00 2001 From: "Barak A. Pearlmutter" Date: Thu, 1 Sep 2011 12:48:57 +0100 Subject: [PATCH] guard use of IP_RECVTOS which is unavailable on kfreebsd --- src/liboping.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.30.2