From fab6a64ab0af0a44d7f998f554e2ff49b151ba27 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 18 Dec 2024 09:02:32 +0000 Subject: [PATCH] Skip `c_char_def` on OpenBSD Fixes https://github.com/rust-lang/libc/issues/4209 (backport ) (cherry picked from commit 9ff340933538e23fdf6cc1ecefc810c664bd0ebe) --- libc-test/build.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 1879334fb21a..d35101d4cae3 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -647,6 +647,11 @@ fn test_openbsd(target: &str) { } }); + cfg.skip_type(move |ty| { + // `c_char_def` is always public but not always reexported. + ty == "c_char_def" + }); + cfg.type_name(move |ty, is_struct, is_union| { match ty { // Just pass all these through, no need for a "struct" prefix