File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
src/unix/linux_like/android Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1906,6 +1906,8 @@ fn test_android(target: &str) {
19061906
19071907 // FIXME(android): "'__uint128' undeclared" in C
19081908 "__uint128" => true ,
1909+ // Added in API level 24
1910+ "if_nameindex" => true ,
19091911
19101912 _ => false ,
19111913 }
@@ -2152,6 +2154,9 @@ fn test_android(target: &str) {
21522154 | "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower"
21532155 | "toupper" => true ,
21542156
2157+ // Added in API level 24
2158+ "if_nameindex" | "if_freenameindex" => true ,
2159+
21552160 _ => false ,
21562161 }
21572162 } ) ;
Original file line number Diff line number Diff line change @@ -3382,7 +3382,9 @@ group
33823382hostent
33833383id_t
33843384idtype_t
3385+ if_freenameindex
33853386if_indextoname
3387+ if_nameindex
33863388if_nametoindex
33873389ifaddrs
33883390ifconf
Original file line number Diff line number Diff line change @@ -517,6 +517,11 @@ s! {
517517 pub ifr6_prefixlen: u32 ,
518518 pub ifr6_ifindex: c_int,
519519 }
520+
521+ pub struct if_nameindex {
522+ pub if_index: c_uint,
523+ pub if_name: * mut c_char,
524+ }
520525}
521526
522527s_no_extra_traits ! {
@@ -4136,6 +4141,9 @@ extern "C" {
41364141 newpath : * const c_char ,
41374142 flags : c_uint ,
41384143 ) -> c_int ;
4144+
4145+ pub fn if_nameindex ( ) -> * mut if_nameindex ;
4146+ pub fn if_freenameindex ( ptr : * mut if_nameindex ) ;
41394147}
41404148
41414149cfg_if ! {
You can’t perform that action at this time.
0 commit comments