Skip to content

Commit 4e3df60

Browse files
committed
Don't generate dispatch_queue structs
1 parent c26efe6 commit 4e3df60

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

generate_bindings.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ bindgen \
2323
--whitelist-var "kSCDynamicStore.*" \
2424
--blacklist-type "(__)?CF.*" \
2525
--blacklist-type "Boolean" \
26+
--blacklist-type "dispatch_queue_[ts]" \
2627
--raw-line "// Generated using:" \
2728
--raw-line "// $BINDGEN_VERSION" \
2829
--raw-line "// macOS SDK $SDK_VERSION." \
@@ -33,6 +34,9 @@ bindgen \
3334
--raw-line "use core_foundation_sys::dictionary::CFDictionaryRef;" \
3435
--raw-line "use core_foundation_sys::propertylist::CFPropertyListRef;" \
3536
--raw-line "use core_foundation_sys::runloop::CFRunLoopSourceRef;" \
37+
--raw-line "" \
38+
--raw-line "/// This is a temporary solution." \
39+
--raw-line "pub type dispatch_queue_t = *mut ::std::os::raw::c_void;" \
3640
-o $BINDING_PATH \
3741
$HEADER_PATH -- \
3842
-I$SDK_PATH/usr/include \

system-configuration-sys/src/dynamic_store.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ use core_foundation_sys::propertylist::CFPropertyListRef;
1111
use core_foundation_sys::runloop::CFRunLoopSourceRef;
1212
use core_foundation_sys::string::CFStringRef;
1313

14-
pub type dispatch_queue_t = *mut dispatch_queue_s;
15-
#[repr(C)]
16-
#[derive(Debug, Copy, Clone)]
17-
pub struct dispatch_queue_s {
18-
pub _address: u8,
19-
}
14+
/// This is a temporary solution.
15+
pub type dispatch_queue_t = *mut ::std::os::raw::c_void;
16+
2017
#[repr(C)]
2118
#[derive(Debug, Copy, Clone)]
2219
pub struct __SCDynamicStore {

0 commit comments

Comments
 (0)