From 70d0a630700f602a457832383161d261fe222db5 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 1 Jul 2010 13:14:26 +0200
Subject: [PATCH] Fix PLT reference
* include/sys/resource.h (__getrlimit): Add hidden proto.
* sysdeps/unix/sysv/linux/i386/getrlimit.c: Add libc_hidden_weak.
* sysdeps/mach/hurd/getrlimit.c: Add libc_hidden_def.
* resource/getrlimit.c: Likewise.
---
ChangeLog | 7 +++++++
include/sys/resource.h | 1 +
resource/getrlimit.c | 1 +
sysdeps/mach/hurd/getrlimit.c | 1 +
sysdeps/unix/sysv/linux/i386/getrlimit.c | 1 +
5 files changed, 11 insertions(+), 0 deletions(-)
--- a/include/sys/resource.h
+++ b/include/sys/resource.h
@@ -14,5 +14,6 @@ extern int __getrusage (enum __rusage_who __who, struct rusage *__usage)
extern int __setrlimit (enum __rlimit_resource __resource,
const struct rlimit *__rlimits);
+libc_hidden_proto (__getrlimit)
#endif
#endif
--- a/resource/getrlimit.c
+++ b/resource/getrlimit.c
@@ -27,6 +27,7 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (__getrlimit)
weak_alias (__getrlimit, getrlimit)
stub_warning (getrlimit)
--- a/sysdeps/mach/hurd/getrlimit.c
+++ b/sysdeps/mach/hurd/getrlimit.c
@@ -43,4 +43,5 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
return 0;
}
+libc_hidden_def (__getrlimit)
weak_alias (__getrlimit, getrlimit)