diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/getrlimit64.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/getrlimit64.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/getrlimit64.c b/sysdeps/unix/sysv/linux/getrlimit64.c index 100ba62..bc36c14 100644 --- a/sysdeps/unix/sysv/linux/getrlimit64.c +++ b/sysdeps/unix/sysv/linux/getrlimit64.c @@ -30,9 +30,13 @@ __getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits) return INLINE_SYSCALL (prlimit64, 4, 0, resource, NULL, rlimits); #else # ifdef __NR_prlimit64 - int res = INLINE_SYSCALL (prlimit64, 4, 0, resource, NULL, rlimits); - if (res == 0 || errno != ENOSYS) + INTERNAL_SYSCALL_DECL (err); + int res = INTERNAL_SYSCALL (prlimit64, err, 4, 0, resource, NULL, + rlimits); + if (!__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (res, err))) return res; + else if (INTERNAL_SYSCALL_ERRNO (res, err) != ENOSYS) + return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (res, err)); # endif struct rlimit rlimits32; |