Skip to content

Commit fd4b70c

Browse files
committed
add getgrent, setgrent, endgrent calls for Android, introduced in API 26, with exclusions to testing since CI is currently on API 24
1 parent 600e1d1 commit fd4b70c

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

libc-test/build.rs

+9
Original file line numberDiff line numberDiff line change
@@ -2015,6 +2015,15 @@ fn test_android(target: &str) {
20152015
// Added in API level 28, but some tests use level 24.
20162016
"aligned_alloc" => true,
20172017

2018+
// Added in API level 26, but some tests use level 24.
2019+
"getgrent" => true,
2020+
2021+
// Added in API level 26, but some tests use level 24.
2022+
"setgrent" => true,
2023+
2024+
// Added in API level 26, but some tests use level 24.
2025+
"endgrent" => true,
2026+
20182027
// FIXME: bad function pointers:
20192028
"isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint"
20202029
| "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower"

libc-test/semver/android.txt

+3
Original file line numberDiff line numberDiff line change
@@ -3223,6 +3223,7 @@ dlsym
32233223
dup
32243224
dup2
32253225
duplocale
3226+
endgrent
32263227
endservent
32273228
epoll_create
32283229
epoll_create1
@@ -3327,6 +3328,7 @@ getegid
33273328
getenv
33283329
geteuid
33293330
getgid
3331+
getgrent
33303332
getgrgid
33313333
getgrgid_r
33323334
getgrnam
@@ -3724,6 +3726,7 @@ seteuid
37243726
setfsgid
37253727
setfsuid
37263728
setgid
3729+
setgrent
37273730
setgroups
37283731
sethostname
37293732
setlocale

src/unix/linux_like/android/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -3679,6 +3679,9 @@ safe_f! {
36793679
}
36803680

36813681
extern "C" {
3682+
pub fn setgrent();
3683+
pub fn endgrent();
3684+
pub fn getgrent() -> *mut ::group;
36823685
pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int;
36833686
pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
36843687
pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int;

0 commit comments

Comments
 (0)