From 6f170efdcf89f2fe68511fb7464f0cec6a4cec6a Mon Sep 17 00:00:00 2001
From: SilverWingedSeraph <lfstindall@gmail.com>
Date: Tue, 12 Sep 2017 12:33:10 -0500
Subject: [PATCH] Prevent testing linux/if.h definitions on musl targets

---
 libc-test/build.rs | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/libc-test/build.rs b/libc-test/build.rs
index a72039f9..b26b393e 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -91,7 +91,7 @@ fn main() {
         cfg.header("sys/mman.h");
         cfg.header("sys/resource.h");
         cfg.header("sys/socket.h");
-        if linux {
+        if linux && !musl {
             cfg.header("linux/if.h");
         }
         cfg.header("sys/time.h");
@@ -665,8 +665,10 @@ fn main() {
         } else {
             cfg.header("linux/fcntl.h");
         }
-        cfg.header("net/if.h");
-        cfg.header("linux/if.h");
+        if !musl {
+            cfg.header("net/if.h");
+            cfg.header("linux/if.h");
+        }
         cfg.header("linux/quota.h");
         cfg.skip_const(move |name| {
             match name {
-- 
GitLab