sysdeps/linux: convert sys_setres{uid,gid} to MLIBC_CHECK_OR_ENOSYS
@@ -1113,11 +1113,7 @@ char *ctermid(char *s) {
}
int setresuid(uid_t ruid, uid_t euid, uid_t suid) {
- if(!mlibc::sys_setresuid) {
- MLIBC_MISSING_SYSDEP();
- errno = ENOSYS;
- return -1;
- }
+ MLIBC_CHECK_OR_ENOSYS(mlibc::sys_setresuid, -1);
if(int e = mlibc::sys_setresuid(ruid, euid, suid); e) {
errno = e;
return -1;
@@ -1126,11 +1122,7 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid) {
}
int setresgid(gid_t rgid, gid_t egid, gid_t sgid) {
- if(!mlibc::sys_setresgid) {
- MLIBC_MISSING_SYSDEP();
- errno = ENOSYS;
- return -1;
- }
+ MLIBC_CHECK_OR_ENOSYS(mlibc::sys_setresgid, -1);
if(int e = mlibc::sys_setresgid(rgid, egid, sgid); e) {
errno = e;
return -1;
