From 9f9a5edcee23462de6a2659d94a732ed09339343 Mon Sep 17 00:00:00 2001
From: Yuki Okushi <huyuumi.dev@gmail.com>
Date: Sat, 29 Feb 2020 19:38:52 +0900
Subject: [PATCH] Skip some items changed in Catalina

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

diff --git a/libc-test/build.rs b/libc-test/build.rs
index 57ae4aa1..b76e20d9 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -182,6 +182,10 @@ fn test_apple(target: &str) {
             // These OSX constants are removed in Sierra.
             // https://developer.apple.com/library/content/releasenotes/General/APIDiffsMacOS10_12/Swift/Darwin.html
             "KERN_KDENABLE_BG_TRACE" | "KERN_KDDISABLE_BG_TRACE" => true,
+            // FIXME: the value has been changed since Catalina (0xffff0000 -> 0x3fff0000).
+            "SF_SETTABLE" => true,
+            // FIXME: the value has been changed since Catalina (VM_FLAGS_RESILIENT_MEDIA is also contained now).
+            "VM_FLAGS_USER_REMAP" => true,
             _ => false,
         }
     });
@@ -199,6 +203,14 @@ fn test_apple(target: &str) {
         }
     });
 
+    cfg.skip_field(move |struct_, field| {
+        match (struct_, field) {
+            // FIXME: the array size has been changed since macOS 10.15 ([8] -> [7]).
+            ("statfs", "f_reserved") => true,
+            _ => false,
+        }
+    });
+
     cfg.skip_field_type(move |struct_, field| {
         match (struct_, field) {
             // FIXME: actually a union
-- 
GitLab