lib: compile even without IPV6_TCLASS
diff --git a/lib/sockopt.c b/lib/sockopt.c
index 6385840..be22827 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -183,12 +183,14 @@
 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 */