                                          _type: ::libc::c_int,
                                          data: *mut ::libc::c_void)
                                -> ::libc::c_int>;
-@@ -280,14 +292,10 @@
+@@ -279,14 +298,10 @@
                              salen: ares_socklen_t, flags: ::libc::c_int,
                              callback: ares_nameinfo_callback,
                              arg: *mut ::libc::c_void) -> ();

+    socklen_t,
+    timeval,
+};
+
+pub type Struct_in_addr = in_addr;
+pub type Struct_sockaddr = sockaddr;

 /* automatically generated by rust-bindgen */
 
 pub type ares_socklen_t = socklen_t;
 pub type __cares_rule_02__ = [::libc::c_char; 1usize];
 pub type __cares_rule_03__ = [::libc::c_char; 1usize];
-pub type ares_socket_t = ::libc::c_int;
+#[cfg(target_os = "windows")]
+pub type ares_socket_t = RawSocket;
+#[cfg(target_os = "linux")]
+pub type ares_socket_t = RawFd;
 pub type ares_sock_state_cb =
-    ::std::option::Option<extern "C" fn(data: *mut ::libc::c_void,
+    ::std::option::Option<unsafe extern "C" fn(data: *mut ::libc::c_void,
                                         socket_fd: ares_socket_t,
                                         readable: ::libc::c_int,
                                         writable: ::libc::c_int) -> ()>;
@@ -42,24 +61,24 @@
 pub enum Struct_ares_channeldata { }
 pub type ares_channel = *mut Struct_ares_channeldata;
 pub type ares_callback =
