Skip to content

Commit 3406fe9

Browse files
committed
provide setfsgid/setfsuid also on android
1 parent 30a7425 commit 3406fe9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

libc-test/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ fn main() {
190190
cfg.header("sys/msg.h");
191191
cfg.header("sys/shm.h");
192192
cfg.header("sys/user.h");
193-
cfg.header("sys/fsuid.h");
194193
cfg.header("sys/timerfd.h");
195194
cfg.header("shadow.h");
196195
if !emscripten {
@@ -240,6 +239,8 @@ fn main() {
240239
}
241240

242241
if linux || android {
242+
cfg.header("sys/fsuid.h");
243+
243244
// DCCP support
244245
if !uclibc && !musl && !emscripten {
245246
cfg.header("linux/dccp.h");

src/unix/notbsd/android/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,8 @@ extern {
10381038
in_fd: ::c_int,
10391039
offset: *mut off_t,
10401040
count: ::size_t) -> ::ssize_t;
1041+
pub fn setfsgid(gid: ::gid_t) -> ::c_int;
1042+
pub fn setfsuid(uid: ::uid_t) -> ::c_int;
10411043
pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
10421044
#[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
10431045
pub fn getgrgid_r(uid: ::uid_t,

0 commit comments

Comments
 (0)