Skip to content

Commit 218d01e

Browse files
committed
Fix field ordering of addrinfo struct on Android
1 parent 8252353 commit 218d01e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/liblibc/lib.rs

+11
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,19 @@ pub mod types {
430430
pub ai_socktype: c_int,
431431
pub ai_protocol: c_int,
432432
pub ai_addrlen: socklen_t,
433+
434+
#[cfg(target_os = "linux")]
433435
pub ai_addr: *sockaddr,
436+
437+
#[cfg(target_os = "linux")]
438+
pub ai_canonname: *c_char,
439+
440+
#[cfg(target_os = "android")]
434441
pub ai_canonname: *c_char,
442+
443+
#[cfg(target_os = "android")]
444+
pub ai_addr: *sockaddr,
445+
435446
pub ai_next: *addrinfo,
436447
}
437448
pub struct sockaddr_un {

0 commit comments

Comments
 (0)