diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-06-11 17:41:16 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-11-30 13:13:03 -0300 |
commit | 83008fa495535aaef74def5ab4ed59967fff1bb6 (patch) | |
tree | 0ba20ad426e1d301233f777263a366734659eb36 /sysdeps/unix/sysv/linux/prlimit.c | |
parent | df4cb2280e32187380520f71bd27ab32252cbc85 (diff) | |
download | glibc-83008fa495535aaef74def5ab4ed59967fff1bb6.tar.gz glibc-83008fa495535aaef74def5ab4ed59967fff1bb6.tar.xz glibc-83008fa495535aaef74def5ab4ed59967fff1bb6.zip |
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.
Diffstat (limited to 'sysdeps/unix/sysv/linux/prlimit.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/prlimit.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/prlimit.c b/sysdeps/unix/sysv/linux/prlimit.c index c12de52693..d4e0b73bce 100644 --- a/sysdeps/unix/sysv/linux/prlimit.c +++ b/sysdeps/unix/sysv/linux/prlimit.c @@ -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 */ |