diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/getrlimit64.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/getrlimit64.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/getrlimit64.c b/sysdeps/unix/sysv/linux/getrlimit64.c index 100ba623e2..b0c85337b3 100644 --- a/sysdeps/unix/sysv/linux/getrlimit64.c +++ b/sysdeps/unix/sysv/linux/getrlimit64.c @@ -27,11 +27,15 @@ int __getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits) { #ifdef __ASSUME_PRLIMIT64 - return INLINE_SYSCALL (prlimit64, 4, 0, resource, NULL, rlimits); + return INLINE_SYSCALL_RETURN (prlimit64, 4, int, 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)) + || INTERNAL_SYSCALL_ERRNO (res, err) != ENOSYS) return res; # endif struct rlimit rlimits32; |