Index: rust-rlimit-0.8.3/src/bindings.rs
===================================================================
--- rust-rlimit-0.8.3.orig/src/bindings.rs
+++ rust-rlimit-0.8.3/src/bindings.rs
@@ -11,6 +11,7 @@
     any(target_os = "freebsd", target_os = "dragonfly"),
     target_os = "netbsd",
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -33,6 +34,7 @@ pub const RLIMIT_AS: u8 = libc::RLIMIT_A
     any(target_os = "freebsd", target_os = "dragonfly"),
     target_os = "netbsd",
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -57,6 +59,7 @@ pub const RLIMIT_AS: u8 = u8::MAX;
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -79,6 +82,7 @@ pub const RLIMIT_CORE: u8 = libc::RLIMIT
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -103,6 +107,7 @@ pub const RLIMIT_CORE: u8 = u8::MAX;
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -125,6 +130,7 @@ pub const RLIMIT_CPU: u8 = libc::RLIMIT_
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -149,6 +155,7 @@ pub const RLIMIT_CPU: u8 = u8::MAX;
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -171,6 +178,7 @@ pub const RLIMIT_DATA: u8 = libc::RLIMIT
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -195,6 +203,7 @@ pub const RLIMIT_DATA: u8 = u8::MAX;
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -217,6 +226,7 @@ pub const RLIMIT_FSIZE: u8 = libc::RLIMI
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -284,6 +294,7 @@ pub const RLIMIT_LOCKS: u8 = u8::MAX;
     any(target_os = "macos", target_os = "ios"),
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -306,6 +317,7 @@ pub const RLIMIT_MEMLOCK: u8 = libc::RLI
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "android",
     target_os = "emscripten",
+    target_os = "hurd",
     target_os = "linux",
     all(target_os = "linux", any(target_arch = "mips", target_arch = "mips64")),
     all(
@@ -399,6 +411,7 @@ pub const RLIMIT_NICE: u8 = u8::MAX;
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -421,6 +434,7 @@ pub const RLIMIT_NOFILE: u8 = libc::RLIM
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -452,6 +466,7 @@ pub const RLIMIT_NOVMON: u8 = u8::MAX;
     any(target_os = "macos", target_os = "ios"),
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -474,6 +489,7 @@ pub const RLIMIT_NPROC: u8 = libc::RLIMI
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "android",
     target_os = "emscripten",
+    target_os = "hurd",
     target_os = "linux",
     all(target_os = "linux", any(target_arch = "mips", target_arch = "mips64")),
     all(
@@ -518,6 +534,7 @@ pub const RLIMIT_POSIXLOCKS: u8 = u8::MA
     any(target_os = "macos", target_os = "ios"),
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -540,6 +557,7 @@ pub const RLIMIT_RSS: u8 = libc::RLIMIT_
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "android",
     target_os = "emscripten",
+    target_os = "hurd",
     target_os = "linux",
     all(target_os = "linux", any(target_arch = "mips", target_arch = "mips64")),
     all(
@@ -625,12 +643,14 @@ pub const RLIMIT_RTTIME: u8 = u8::MAX;
 
 #[cfg(any(
     any(target_os = "freebsd", target_os = "dragonfly"),
+    target_os = "hurd",
     target_os = "netbsd",
 ))]
 pub const RLIMIT_SBSIZE: u8 = libc::RLIMIT_SBSIZE as u8;
 
 #[cfg(not(any(
     any(target_os = "freebsd", target_os = "dragonfly"),
+    target_os = "hurd",
     target_os = "netbsd",
 )))]
 pub const RLIMIT_SBSIZE: u8 = u8::MAX;
@@ -679,6 +699,7 @@ pub const RLIMIT_SIGPENDING: u8 = u8::MA
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -701,6 +722,7 @@ pub const RLIMIT_STACK: u8 = libc::RLIMI
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
@@ -737,12 +759,14 @@ pub const RLIMIT_UMTXP: u8 = u8::MAX;
 
 #[cfg(any(
     any(target_os = "freebsd", target_os = "dragonfly"),
+    target_os = "hurd",
     any(target_os = "solaris", target_os = "illumos"),
 ))]
 pub const RLIMIT_VMEM: u8 = libc::RLIMIT_VMEM as u8;
 
 #[cfg(not(any(
     any(target_os = "freebsd", target_os = "dragonfly"),
+    target_os = "hurd",
     any(target_os = "solaris", target_os = "illumos"),
 )))]
 pub const RLIMIT_VMEM: u8 = u8::MAX;
@@ -758,6 +782,7 @@ fn resource_bound() {
         any(target_os = "freebsd", target_os = "dragonfly"),
         target_os = "netbsd",
         target_os = "haiku",
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         target_os = "linux",
@@ -780,6 +805,7 @@ fn resource_bound() {
         any(target_os = "freebsd", target_os = "dragonfly"),
         any(target_os = "openbsd", target_os = "netbsd"),
         target_os = "haiku",
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         target_os = "linux",
@@ -802,6 +828,7 @@ fn resource_bound() {
         any(target_os = "freebsd", target_os = "dragonfly"),
         any(target_os = "openbsd", target_os = "netbsd"),
         target_os = "haiku",
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         target_os = "linux",
@@ -824,6 +851,7 @@ fn resource_bound() {
         any(target_os = "freebsd", target_os = "dragonfly"),
         any(target_os = "openbsd", target_os = "netbsd"),
         target_os = "haiku",
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         target_os = "linux",
@@ -846,6 +874,7 @@ fn resource_bound() {
         any(target_os = "freebsd", target_os = "dragonfly"),
         any(target_os = "openbsd", target_os = "netbsd"),
         target_os = "haiku",
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         target_os = "linux",
@@ -887,6 +916,7 @@ fn resource_bound() {
         any(target_os = "macos", target_os = "ios"),
         any(target_os = "freebsd", target_os = "dragonfly"),
         any(target_os = "openbsd", target_os = "netbsd"),
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         target_os = "linux",
@@ -942,6 +972,7 @@ fn resource_bound() {
         any(target_os = "freebsd", target_os = "dragonfly"),
         any(target_os = "openbsd", target_os = "netbsd"),
         target_os = "haiku",
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         target_os = "linux",
@@ -966,6 +997,7 @@ fn resource_bound() {
         any(target_os = "macos", target_os = "ios"),
         any(target_os = "freebsd", target_os = "dragonfly"),
         any(target_os = "openbsd", target_os = "netbsd"),
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         target_os = "linux",
@@ -995,6 +1027,7 @@ fn resource_bound() {
         any(target_os = "macos", target_os = "ios"),
         any(target_os = "freebsd", target_os = "dragonfly"),
         any(target_os = "openbsd", target_os = "netbsd"),
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         target_os = "linux",
@@ -1044,6 +1077,7 @@ fn resource_bound() {
 
     #[cfg(any(
         any(target_os = "freebsd", target_os = "dragonfly"),
+        target_os = "hurd",
         target_os = "netbsd",
     ))]
     assert!((0..128).contains(&libc::RLIMIT_SBSIZE));
@@ -1071,6 +1105,7 @@ fn resource_bound() {
         any(target_os = "freebsd", target_os = "dragonfly"),
         any(target_os = "openbsd", target_os = "netbsd"),
         target_os = "haiku",
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         target_os = "linux",
@@ -1095,6 +1130,7 @@ fn resource_bound() {
 
     #[cfg(any(
         any(target_os = "freebsd", target_os = "dragonfly"),
+        target_os = "hurd",
         any(target_os = "solaris", target_os = "illumos"),
     ))]
     assert!((0..128).contains(&libc::RLIMIT_VMEM));
@@ -1102,6 +1138,7 @@ fn resource_bound() {
 
 #[cfg(any(
     target_os = "fuchsia",
+    target_os = "hurd",
     all(target_os = "android", target_pointer_width = "32"),
     all(target_os = "android", target_pointer_width = "64"),
     target_os = "emscripten",
@@ -1112,6 +1149,7 @@ pub use libc::rlimit64 as rlimit;
 #[cfg(all(
     not(any(
         target_os = "fuchsia",
+        target_os = "hurd",
         all(target_os = "android", target_pointer_width = "32"),
         all(target_os = "android", target_pointer_width = "64"),
         target_os = "emscripten",
@@ -1130,6 +1168,7 @@ pub use libc::rlimit64 as rlimit;
 pub use libc::rlimit;
 
 #[cfg(any(
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     all(target_os = "linux", target_env = "gnu"),
@@ -1140,6 +1179,7 @@ pub use libc::getrlimit64 as getrlimit;
 
 #[cfg(all(
     not(any(
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         all(target_os = "linux", target_env = "gnu"),
@@ -1171,6 +1211,7 @@ pub use libc::getrlimit64 as getrlimit;
 pub use libc::getrlimit;
 
 #[cfg(any(
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     all(target_os = "linux", target_env = "gnu"),
@@ -1181,6 +1222,7 @@ pub use libc::setrlimit64 as setrlimit;
 
 #[cfg(all(
     not(any(
+        target_os = "hurd",
         target_os = "android",
         target_os = "emscripten",
         all(target_os = "linux", target_env = "gnu"),
@@ -1233,12 +1275,18 @@ pub use libc::setrlimit;
 ))]
 pub const RLIM_INFINITY: u64 = libc::RLIM_INFINITY as u64;
 
+#[cfg(any(
+    target_os = "hurd",
+))]
+pub const RLIM_INFINITY: u64 = libc::RLIM64_INFINITY as u64;
+
 #[cfg(not(any(
     target_os = "fuchsia",
     any(target_os = "macos", target_os = "ios"),
     any(target_os = "freebsd", target_os = "dragonfly"),
     any(target_os = "openbsd", target_os = "netbsd"),
     target_os = "haiku",
+    target_os = "hurd",
     target_os = "android",
     target_os = "emscripten",
     target_os = "linux",
Index: rust-rlimit-0.8.3/tests/it/unix.rs
===================================================================
--- rust-rlimit-0.8.3.orig/tests/it/unix.rs
+++ rust-rlimit-0.8.3/tests/it/unix.rs
@@ -15,8 +15,8 @@ fn resource_set_get() {
 
     assert_eq!(Resource::FSIZE.get().unwrap(), (SOFT, HARD));
 
-    // FIXME: why does this line succeed on freebsd?
-    #[cfg(not(target_os = "freebsd"))]
+    // FIXME: why does this line succeed on freebsd and Hurd?
+    #[cfg(not(any(target_os = "freebsd", target_os = "hurd")))]
     {
         expect_err(Resource::FSIZE.set(HARD, SOFT), ErrorKind::InvalidInput);
     }
