Skip to content

Commit 405806f

Browse files
committed
Also block rd_kafka_conf_set_resolve_cb, as it also depends on addrinfo.
1 parent d166014 commit 405806f

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

rdkafka-sys/src/bindings.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* automatically generated by rust-bindgen 0.66.1 */
22

3-
use libc::{addrinfo, c_char, c_int, c_void, sockaddr, FILE};
3+
use libc::{c_char, c_int, c_void, sockaddr, FILE};
44
use num_enum::TryFromPrimitive;
55

66
pub const RD_KAFKA_VERSION: i32 = 33685759;
@@ -853,20 +853,6 @@ extern "C" {
853853
closesocket_cb: Option<unsafe extern "C" fn(sockfd: c_int, opaque: *mut c_void) -> c_int>,
854854
);
855855
}
856-
extern "C" {
857-
pub fn rd_kafka_conf_set_resolve_cb(
858-
conf: *mut rd_kafka_conf_t,
859-
resolve_cb: Option<
860-
unsafe extern "C" fn(
861-
node: *const c_char,
862-
service: *const c_char,
863-
hints: *const addrinfo,
864-
res: *mut *mut addrinfo,
865-
opaque: *mut c_void,
866-
) -> c_int,
867-
>,
868-
);
869-
}
870856
extern "C" {
871857
pub fn rd_kafka_conf_set_ssl_cert_verify_cb(
872858
conf: *mut rd_kafka_conf_t,

rdkafka-sys/update-bindings.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env bash
22

3-
# rd_kafka_conf_set_open_cb is blocklisted because it is not compiled on
4-
# Windows due to its usage of the Unix-only `mode_t` type. With a bit of
5-
# elbow grease we could include it if not targeting Windows, but it doesn't
6-
# seem worthwhile at the moment.
3+
# rd_kafka_conf_set_open_cb/rd_kafka_conf_set_resolve_cb are blocklisted
4+
# because it is not compiled on Windows due to its usage of the Unix-only
5+
# `mode_t` type. With a bit of elbow grease we could include it if not
6+
# targeting Windows, but it doesn't seem worthwhile at the moment.
77

88
bindgen \
99
--no-doc-comments \
@@ -14,7 +14,8 @@ bindgen \
1414
--allowlist-var "rd_kafka.*|RD_KAFKA_.*" \
1515
--no-recursive-allowlist \
1616
--blocklist-function "rd_kafka_conf_set_open_cb" \
17-
--raw-line "use libc::{FILE, addrinfo, sockaddr, c_int, c_void, c_char};" \
17+
--blocklist-function "rd_kafka_conf_set_resolve_cb" \
18+
--raw-line "use libc::{FILE, sockaddr, c_int, c_void, c_char};" \
1819
--raw-line "use num_enum::TryFromPrimitive;" \
1920
--default-macro-constant-type "signed" \
2021
"bindings.h" -o "src/bindings.rs"

0 commit comments

Comments
 (0)