From 009a41300f41c65e7439d7874790185dcd2cb077 Mon Sep 17 00:00:00 2001 From: Jon Dugan Date: Wed, 8 Sep 2010 20:33:54 +0000 Subject: [PATCH] if IPV6_TCLASS isn't defined do something reasonable --- src/iperf_api.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/iperf_api.c b/src/iperf_api.c index f2d6f1e..83b7629 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -1388,10 +1388,15 @@ iperf_init_stream(struct iperf_stream *sp, struct iperf_test *test) /* Set IP TOS */ if ((opt = test->settings->tos)) { if (test->settings->domain == AF_INET6) { +#ifdef IPV6_TCLASS if (setsockopt(sp->socket, IPPROTO_IPV6, IPV6_TCLASS, &opt, sizeof(opt)) < 0) { i_errno = IESETCOS; return (-1); } +#else + i_errno = IESETCOS; + return (-1); +#endif } else { if (setsockopt(sp->socket, IPPROTO_IP, IP_TOS, &opt, sizeof(opt)) < 0) { i_errno = IESETTOS;