Skip to content

Declare setdomainname and getdomainname on Android. #4212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2081,6 +2081,9 @@ fn test_android(target: &str) {
// Added in API level 26, but some tests use level 24.
"endgrent" => true,

// Added in API level 26, but some tests use level 24.
"getdomainname" | "setdomainname" => true,

// FIXME: bad function pointers:
"isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint"
| "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower"
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3324,6 +3324,7 @@ getaddrinfo
getchar
getchar_unlocked
getcwd
getdomainname
getegid
getenv
geteuid
Expand Down Expand Up @@ -3720,6 +3721,7 @@ sendmsg
sendto
servent
setbuf
setdomainname
setegid
setenv
seteuid
Expand Down
2 changes: 0 additions & 2 deletions src/unix/linux_like/emscripten/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1576,8 +1576,6 @@ extern "C" {
pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int;
pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char;

pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int;
pub fn setdomainname(name: *const c_char, len: size_t) -> c_int;
pub fn sendmmsg(
sockfd: c_int,
msgvec: *mut crate::mmsghdr,
Expand Down
2 changes: 0 additions & 2 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6429,8 +6429,6 @@ extern "C" {

pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char;

pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int;
pub fn setdomainname(name: *const c_char, len: size_t) -> c_int;
pub fn vhangup() -> c_int;
pub fn sync();
pub fn syncfs(fd: c_int) -> c_int;
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1863,6 +1863,9 @@ extern "C" {
locale: crate::locale_t,
) -> size_t;
pub fn strptime(s: *const c_char, format: *const c_char, tm: *mut crate::tm) -> *mut c_char;

pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int;
pub fn setdomainname(name: *const c_char, len: size_t) -> c_int;
}

// LFS64 extensions
Expand Down
Loading