Code

guard use of IP_RECVTOS which is unavailable on kfreebsd
authorBarak A. Pearlmutter <barak+git@cs.nuim.ie>
Thu, 1 Sep 2011 11:48:57 +0000 (12:48 +0100)
committerFlorian Forster <octo@verplant.org>
Mon, 5 Sep 2011 02:56:32 +0000 (22:56 -0400)
src/liboping.c

index 83ca9c242c072cb61622ede4c0058d51c9036f69..76a7d53456c1fd31be8fef44b87695e6f74bfb70 100644 (file)
@@ -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;