summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/getrlimit64.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2018-01-07 20:33:26 +0100
committerAurelien Jarno <aurelien@aurel32.net>2018-01-07 20:33:32 +0100
commitc2e014cc33ef814a8f24fb7aabe1cee5265056f3 (patch)
tree35f441f8ab1549105ea1529061928ab6df5ae087 /sysdeps/unix/sysv/linux/getrlimit64.c
parent200fc24b9dd2360bc850fe71ed22410051426d96 (diff)
downloadglibc-c2e014cc33ef814a8f24fb7aabe1cee5265056f3.tar.gz
glibc-c2e014cc33ef814a8f24fb7aabe1cee5265056f3.tar.xz
glibc-c2e014cc33ef814a8f24fb7aabe1cee5265056f3.zip
getrlimit64: fix for 32-bit configurations with default version >= 2.2
Commit 24731685 ("prlimit: Translate old_rlimit from RLIM64_INFINITY to
RLIM_INFINITY") broken the getrlimit64 for 32-bit configurations which
do no need the 2GiB limited compat getrlimit (default version >= 2.2).

This patch fixes that by restoring the weak alias in that case.

Changelog:
	* sysdeps/unix/sysv/linux/getrlimit64 (getrlimit64)
	[!__RLIM_T_MATCHES_RLIM64_T]
	[!SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_2)]: Define as weak alias of
	__getrlimit64. Add libc_hidden_weak.
Diffstat (limited to 'sysdeps/unix/sysv/linux/getrlimit64.c')
-rw-r--r--sysdeps/unix/sysv/linux/getrlimit64.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/getrlimit64.c b/sysdeps/unix/sysv/linux/getrlimit64.c
index 1cc82e364d..a14ca58096 100644
--- a/sysdeps/unix/sysv/linux/getrlimit64.c
+++ b/sysdeps/unix/sysv/linux/getrlimit64.c
@@ -81,4 +81,7 @@ __old_getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits)
 }
 versioned_symbol (libc, __getrlimit64, getrlimit64, GLIBC_2_2);
 compat_symbol (libc, __old_getrlimit64, getrlimit64, GLIBC_2_1);
+#else
+weak_alias (__getrlimit64, getrlimit64)
+libc_hidden_weak (getrlimit64)
 #endif /* __RLIM_T_MATCHES_RLIM64_T  */