diff --git a/libc-test/build.rs b/libc-test/build.rs
index 33fb1358e3b9d39e0b0a96026976cd3bb09fcec0..25eb8e1f9b09b446899ab9f4872cba81ff4e54e7 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -2410,7 +2410,7 @@ fn test_linux(target: &str) {
     }
 
     if !musl || mips {
-        assert!(gnu || uclibc || (mips && !musl));
+        assert!(gnu || uclibc || (mips && musl));
         headers! { cfg:  "linux/memfd.h" };
     }