1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

linux: Add prlimit64 C implementation

The LFS prlimit64 requires a arch-specific implementation in
syscalls.list.  Instead add a generic one that handles the
required symbol alias for __RLIM_T_MATCHES_RLIM64_T.

HPPA is the only outlier which requires a different default
symbol.

Checked on x86_64-linux-gnu and with build for the affected ABIs.
This commit is contained in:
Adhemerval Zanella
2020-06-11 17:41:16 -03:00
parent df4cb2280e
commit 83008fa495
18 changed files with 47 additions and 27 deletions

View File

@ -18,6 +18,10 @@
#include <sys/resource.h>
#include <sysdep.h>
/* For ports that support the 64-bit ABI we do not need to define prlimit
and instead prlimit aliases to prlimit64. See the prlimit64
implementation. */
#if !__RLIM_T_MATCHES_RLIM64_T
int
prlimit (__pid_t pid, enum __rlimit_resource resource,
const struct rlimit *new_rlimit, struct rlimit *old_rlimit)
@ -73,3 +77,4 @@ prlimit (__pid_t pid, enum __rlimit_resource resource,
return res;
}
#endif /* __RLIM_T_MATCHES_RLIM64_T */