Skip to content

Commit 615f178

Browse files
committed
Fix missing "__off_t" on NetBSD 10
NetBSD uses a type redefinition guard for off_t[1] with the same name, confusing bindgen and making it generate a reference to a missing type: ``` error[E0412]: cannot find type `__off_t` in this scope --> .../target/debug/build/openssl-sys-f09155f99ab31e50/out/bindgen.rs:24508:17 | 24508 | offset: __off_t, | ^^^^^^^ help: a type alias with a similar name exists: `off_t` ``` [1]: https://github.com/NetBSD/src/blob/9ae2aa18e3f4ffeb1efda2bdd171a1f6d22fc3ce/sys/sys/types.h#L191
1 parent 9119367 commit 615f178

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

openssl-sys/build/run_bindgen.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ impl ParseCallbacks for OpensslCallbacks {
370370
| "SSL_set_tmp_ecdh_callback"
371371
| "SSL_CTX_callback_ctrl"
372372
| "SSL_CTX_set_alpn_select_cb" => Some(format!("{}__fixed_rust", item_info.name)),
373+
// On NetBSD, "off_t" is generated as "__off_t".
374+
"__off_t" => Some("off_t".to_string()),
373375
_ => None,
374376
}
375377
}

0 commit comments

Comments
 (0)