Index: rust-net2-0.2.39/src/socket.rs
===================================================================
--- rust-net2-0.2.39.orig/src/socket.rs
+++ rust-net2-0.2.39/src/socket.rs
@@ -125,6 +125,7 @@ fn addr2raw_v4(addr: &SocketAddrV4) -> (
             #[cfg(any(
                 target_os = "dragonfly",
                 target_os = "freebsd",
+                target_os = "hurd",
                 target_os = "ios",
                 target_os = "macos",
                 target_os = "netbsd",
@@ -175,6 +176,7 @@ fn addr2raw_v6(addr: &SocketAddrV6) -> (
             #[cfg(any(
                 target_os = "dragonfly",
                 target_os = "freebsd",
+                target_os = "hurd",
                 target_os = "ios",
                 target_os = "macos",
                 target_os = "netbsd",
Index: rust-net2-0.2.39/src/ext.rs
===================================================================
--- rust-net2-0.2.39.orig/src/ext.rs
+++ rust-net2-0.2.39/src/ext.rs
@@ -24,6 +24,7 @@ cfg_if! {
     if #[cfg(any(target_os = "dragonfly",
                  target_os = "freebsd",
                  target_os = "haiku",
+                 target_os = "hurd",
                  target_os = "ios",
                  target_os = "macos",
                  target_os = "netbsd",
@@ -663,7 +664,10 @@ impl<T: AsRawSocket> AsSock for T {
 cfg_if! {
     if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "nto"))] {
         use libc::TCP_KEEPALIVE as KEEPALIVE_OPTION;
-    } else if #[cfg(any(target_os = "haiku", target_os = "netbsd", target_os = "openbsd"))] {
+    } else if #[cfg(any(target_os = "haiku",
+                        target_os = "hurd",
+                        target_os = "netbsd",
+                        target_os = "openbsd"))] {
         use libc::SO_KEEPALIVE as KEEPALIVE_OPTION;
     } else if #[cfg(unix)] {
         use libc::TCP_KEEPIDLE as KEEPALIVE_OPTION;
