OpenConnect 7.08 fails to compile on GNU/Hurd

Mike Miller mtmiller at
Sat Dec 24 18:31:33 PST 2016


OpenConnect 7.08 fails to build on GNU/Hurd, because the IPV6_TCLASS
option is not declared by glibc on that platform. This was introduced in
commit 37316927 (Add --passtos option to copy TOS/TCLASS from VPN

I can work around this by simply defining around this option. Would the
following patch work to safely and silently disable this feature in this

--- a/ssl.c
+++ b/ssl.c
@@ -914,7 +914,11 @@
 		struct sockaddr_in6 *sin = (void *)vpninfo->dtls_addr;
 		sin->sin6_port = htons(port);
 		vpninfo->dtls_tos_proto = IPPROTO_IPV6;
+#if defined(IPV6_TCLASS)
 		vpninfo->dtls_tos_optname = IPV6_TCLASS;
+		vpninfo->dtls_tos_optname = 0;
 	} else {
 		vpn_progress(vpninfo, PRG_ERR,
 			     _("Unknown protocol family %d. Cannot create UDP server address\n"),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <>

More information about the openconnect-devel mailing list