]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: compile even without IPV6_TCLASS
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 12 Oct 2011 11:07:34 +0000 (15:07 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 17 Oct 2011 14:59:26 +0000 (18:59 +0400)
lib/sockopt.c

index 638584087735fb2e4d9ec14be99218aa616ad41a..be22827f6e2bda2e6d0c0d89578e14a5f2fe7898 100644 (file)
@@ -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 */