summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2011-10-12 15:07:34 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2011-10-17 18:59:26 +0400
commitad61af67b548fa787d4c1da0024ba30f8c3b19c8 (patch)
tree3d0cdb58217702b51b9bdac6e8b11e4a68d0b54d
parent6d0732c8abad7ace509d033a41814ea03a3a1b16 (diff)
lib: compile even without IPV6_TCLASS
-rw-r--r--lib/sockopt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sockopt.c b/lib/sockopt.c
index 63858408..be22827f 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -183,12 +183,14 @@ getsockopt_ipv6_ifindex (struct msghdr *msgh)
int
setsockopt_ipv6_tclass(int sock, int tclass)
{
- int ret;
+ int ret = 0;
+#ifdef IPV6_TCLASS /* RFC3542 */
ret = setsockopt (sock, IPPROTO_IPV6, IPV6_TCLASS, &tclass, sizeof (tclass));
if (ret < 0)
zlog_warn ("Can't set IPV6_TCLASS option for fd %d to %#x: %s",
sock, tclass, safe_strerror(errno));
+#endif
return ret;
}
#endif /* HAVE_IPV6 */