diff --git a/src/wait/src/lib.rs b/src/wait/src/lib.rs
index 06d410cdd99566bc40f2391eb78940e7a3a9cbc4..88b2a56e81deff5f98d89c84034237bd15a39773 100644
--- a/src/wait/src/lib.rs
+++ b/src/wait/src/lib.rs
@@ -11,7 +11,7 @@ use resource::rusage;
 
 #[no_mangle]
 pub unsafe extern "C" fn wait(stat_loc: *mut c_int) -> pid_t {
-    waitpid(0 - 1, stat_loc, 0)
+    waitpid(!0, stat_loc, 0)
 }
 
 #[no_mangle]