File liboping-conditional_IPV6_TCLASS.patch of Package liboping

--- src/liboping.c.orig	2010-10-29 23:46:11.000000000 +0200
+++ src/liboping.c	2010-10-29 23:46:40.000000000 +0200
@@ -532,12 +532,14 @@
 			if (cmsg->cmsg_level != IPPROTO_IPV6)
 				continue;
 
+#ifdef IPV6_TCLASS
 			if (cmsg->cmsg_type == IPV6_TCLASS)
 			{
 				memcpy (&recv_qos, CMSG_DATA (cmsg),
 						sizeof (recv_qos));
 				dprintf ("TOSv6 = 0x%02"PRIx8";\n", recv_qos);
 			} else
+#endif
 			if (cmsg->cmsg_type == IPV6_HOPLIMIT)
 			{
 				memcpy (&recv_ttl, CMSG_DATA (cmsg),
@@ -974,6 +976,7 @@
 			dprintf ("Setting TP_TOS failed: %s\n", errbuf);
 		}
 	}
+#ifdef IPV6_TCLASS
 	else if (ph->addrfamily == AF_INET6)
 	{
 		/* IPV6_TCLASS requires an "int". */
@@ -990,6 +993,7 @@
 			dprintf ("Setting IPV6_TCLASS failed: %s\n", errbuf);
 		}
 	}
+#endif
 
 	return (ret);
 }
openSUSE Build Service is sponsored by