Skip to content

Commit eb7e9f0

Browse files
committed
lift setfsgid/setfsuid from Linux to non-bsd
1 parent 30a7425 commit eb7e9f0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

libc-test/build.rs

Lines changed: 1 addition & 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 {
@@ -212,6 +211,7 @@ fn main() {
212211
cfg.header("sched.h");
213212
cfg.header("sys/epoll.h");
214213
cfg.header("sys/eventfd.h");
214+
cfg.header("sys/fsuid.h");
215215
cfg.header("sys/prctl.h");
216216
cfg.header("sys/sendfile.h");
217217
cfg.header("sys/signalfd.h");

src/unix/notbsd/linux/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,8 +1224,6 @@ extern {
12241224
riovcnt: ::c_ulong,
12251225
flags: ::c_ulong) -> isize;
12261226
pub fn reboot(how_to: ::c_int) -> ::c_int;
1227-
pub fn setfsgid(gid: ::gid_t) -> ::c_int;
1228-
pub fn setfsuid(uid: ::uid_t) -> ::c_int;
12291227

12301228
// Not available now on Android
12311229
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,

src/unix/notbsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,8 @@ extern {
970970
options: ::c_int) -> ::c_int;
971971
pub fn setreuid(ruid: ::uid_t, euid: ::uid_t) -> ::c_int;
972972
pub fn setregid(rgid: ::gid_t, egid: ::gid_t) -> ::c_int;
973+
pub fn setfsgid(gid: ::gid_t) -> ::c_int;
974+
pub fn setfsuid(uid: ::uid_t) -> ::c_int;
973975
pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t,
974976
suid: *mut ::uid_t) -> ::c_int;
975977
pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t,

0 commit comments

Comments
 (0)