@@ -1,13 +1,23 @@
/* automatically generated by rust-bindgen */
+#![allow(non_camel_case_types, non_snake_case)]
+use c_types::fd_set;
+use c_types::hostent;
+use c_types::in_addr;
+use c_types::iovec;
+use c_types::sockaddr;
+use c_types::socklen_t;
+use libc::timeval;
+
+#[cfg(target_os = "android")]
+use jni_sys;
+
+#[cfg(windows)]
+pub type ares_socket_t = ::winapi::um::winsock2::SOCKET;
+#[cfg(unix)]
+pub type ares_socket_t = ::std::os::unix::io::RawFd;
pub type ares_socklen_t = socklen_t;
pub type ares_ssize_t = isize;
-pub type in_addr_t = u32;
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct in_addr {
- pub s_addr: in_addr_t,
-}
pub type ares_sock_state_cb = ::std::option::Option<
unsafe extern "C" fn(
data: *mut ::std::os::raw::c_void,
@@ -368,7 +378,7 @@
_bindgen_union_align: [u8; 16usize],
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Copy, Clone)]
pub struct ares_addrttl {
pub ipaddr: in_addr,
pub ttl: ::std::os::raw::c_int,
@@ -602,3 +612,17 @@
dst: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
+#[cfg(target_os = "android")]
+extern "C" {
+ pub fn ares_library_init_jvm(jvm: *mut jni_sys::JavaVM);
+}
+#[cfg(target_os = "android")]
+extern "C" {
+ pub fn ares_library_init_android(
+ connectivity_manager: jni_sys::jobject,
+ ) -> ::std::os::raw::c_int;
+}
+#[cfg(target_os = "android")]
+extern "C" {
+ pub fn ares_library_android_initialized() -> ::std::os::raw::c_int;
+}