Skip to content

Commit 0fe000d

Browse files
committed
Switch over to libc::c_void
1 parent c1ab6ef commit 0fe000d

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

generate_bindings.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ bindgen \
4444
--raw-line "use core_foundation_sys::runloop::CFRunLoopRef;" \
4545
--raw-line "" \
4646
--raw-line "use dispatch_queue_t;" \
47-
--raw-line "use std::os::raw::c_void;" \
47+
--raw-line "use libc::c_void;" \
4848
--raw-line "" \
4949
--raw-line "pub type AuthorizationOpaqueRef = c_void;" \
5050
--raw-line "pub type __SCPreferences = c_void;" \
@@ -113,9 +113,8 @@ bindgen \
113113
--raw-line "use core_foundation_sys::runloop::CFRunLoopRef;" \
114114
--raw-line "" \
115115
--raw-line "use dispatch_queue_t;" \
116-
--raw-line "use libc::sockaddr;" \
116+
--raw-line "use libc::{c_void, c_char, c_int, sockaddr};" \
117117
--raw-line "use preferences::SCPreferencesRef;" \
118-
--raw-line "use std::os::raw::{c_void, c_char, c_int};" \
119118
--raw-line "" \
120119
--raw-line "pub type __SCNetworkReachability = c_void;" \
121120
--raw-line "pub type __SCNetworkConnection = c_void;" \

system-configuration-sys/src/dynamic_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use core_foundation_sys::runloop::CFRunLoopSourceRef;
1212
use core_foundation_sys::string::CFStringRef;
1313

1414
use dispatch_queue_t;
15-
use std::os::raw::c_void;
15+
use libc::c_void;
1616

1717
pub type __SCDynamicStore = c_void;
1818
pub type SCDynamicStoreRef = *const __SCDynamicStore;

system-configuration-sys/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub extern crate core_foundation_sys;
2020
pub extern crate libc;
2121

2222
/// This is a temporary solution.
23-
pub type dispatch_queue_t = *mut ::std::os::raw::c_void;
23+
pub type dispatch_queue_t = *mut libc::c_void;
2424

2525
pub mod dynamic_store;
2626
pub mod network_configuration;

system-configuration-sys/src/network_configuration.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ use core_foundation_sys::runloop::CFRunLoopRef;
1111
use core_foundation_sys::string::CFStringRef;
1212

1313
use dispatch_queue_t;
14-
use libc::sockaddr;
14+
use libc::{c_char, c_int, c_void, sockaddr};
1515
use preferences::SCPreferencesRef;
16-
use std::os::raw::{c_char, c_int, c_void};
1716

1817
pub type __SCNetworkReachability = c_void;
1918
pub type SCNetworkReachabilityRef = *const __SCNetworkReachability;

system-configuration-sys/src/preferences.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use core_foundation_sys::runloop::CFRunLoopRef;
1212
use core_foundation_sys::string::CFStringRef;
1313

1414
use dispatch_queue_t;
15-
use std::os::raw::c_void;
15+
use libc::c_void;
1616

1717
pub type AuthorizationOpaqueRef = c_void;
1818
pub type AuthorizationRef = *const AuthorizationOpaqueRef;

system-configuration/src/dynamic_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ use core_foundation::runloop::CFRunLoopSource;
2121
use core_foundation::string::CFString;
2222

2323
pub use system_configuration_sys::dynamic_store::*;
24+
use system_configuration_sys::libc::c_void;
2425

25-
use std::os::raw::c_void;
2626
use std::ptr;
2727

2828
/// Struct describing the callback happening when a watched value in the dynamic store is changed.

0 commit comments

Comments
 (0)