Skip to content

Commit 0de0829

Browse files
Takashiidobetgross35
authored andcommitted
add getgrent, setgrent, endgrent calls for Android, introduced in API 26, with exclusions to testing since CI is currently on API 24
(backport <rust-lang#3499>) (cherry picked from commit fd4b70c)
1 parent bd00c8e commit 0de0829

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

libc-test/build.rs

+12
Original file line numberDiff line numberDiff line change
@@ -2072,6 +2072,18 @@ fn test_android(target: &str) {
20722072
// Added in API level 28, but some tests use level 24.
20732073
"fread_unlocked" | "fwrite_unlocked" | "fgets_unlocked" | "fflush_unlocked" => true,
20742074

2075+
// Added in API level 28, but some tests use level 24.
2076+
"aligned_alloc" => true,
2077+
2078+
// Added in API level 26, but some tests use level 24.
2079+
"getgrent" => true,
2080+
2081+
// Added in API level 26, but some tests use level 24.
2082+
"setgrent" => true,
2083+
2084+
// Added in API level 26, but some tests use level 24.
2085+
"endgrent" => true,
2086+
20752087
// FIXME: bad function pointers:
20762088
"isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint"
20772089
| "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower"

libc-test/semver/android.txt

+3
Original file line numberDiff line numberDiff line change
@@ -3186,6 +3186,7 @@ dlsym
31863186
dup
31873187
dup2
31883188
duplocale
3189+
endgrent
31893190
endservent
31903191
epoll_create
31913192
epoll_create1
@@ -3290,6 +3291,7 @@ getegid
32903291
getenv
32913292
geteuid
32923293
getgid
3294+
getgrent
32933295
getgrgid
32943296
getgrgid_r
32953297
getgrnam
@@ -3684,6 +3686,7 @@ seteuid
36843686
setfsgid
36853687
setfsuid
36863688
setgid
3689+
setgrent
36873690
setgroups
36883691
sethostname
36893692
setlocale

src/unix/linux_like/android/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -3675,6 +3675,9 @@ safe_f! {
36753675
}
36763676

36773677
extern "C" {
3678+
pub fn setgrent();
3679+
pub fn endgrent();
3680+
pub fn getgrent() -> *mut ::group;
36783681
pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int;
36793682
pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
36803683
pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int;

0 commit comments

Comments
 (0)