From cb3a9db37887696d5d2426e325d554ae1a354139 Mon Sep 17 00:00:00 2001
From: gnzlbg <gonzalobg88@gmail.com>
Date: Tue, 14 May 2019 16:54:10 +0200
Subject: [PATCH] Include aio.h as the last header

---
 libc-test/build.rs | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/libc-test/build.rs b/libc-test/build.rs
index e1472fd6..c4595ebd 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -2262,17 +2262,6 @@ fn test_linux(target: &str) {
     // FIXME: still necessary?
     cfg.flag("-Wno-deprecated-declarations");
 
-    // note: aio.h must be included before sys/mount.h
-    if !uclibc {
-        assert!(gnu || musl);
-        // optionally included in uclibc
-        headers! { cfg:
-                   "sys/xattr.h",
-                   "sys/sysinfo.h",
-                   "aio.h",
-        }
-    }
-
     headers! { cfg:
                "ctype.h",
                "dirent.h",
@@ -2419,6 +2408,17 @@ fn test_linux(target: &str) {
         headers! { cfg:  "linux/memfd.h" };
     }
 
+    // note: aio.h must be included before sys/mount.h
+    if !uclibc {
+        assert!(gnu || musl);
+        // optionally included in uclibc
+        headers! { cfg:
+                   "sys/xattr.h",
+                   "sys/sysinfo.h",
+                   "aio.h",
+        }
+    }
+
     cfg.type_name(move |ty, is_struct, is_union| {
         match ty {
             // Just pass all these through, no need for a "struct" prefix
-- 
GitLab