about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2013-05-06 14:58:00 -0700
committerRoland McGrath <roland@hack.frob.com>2013-05-06 14:58:00 -0700
commitb99b892f6854b98bac5a581cbd20a6a7ed2e2470 (patch)
treebd02cd37ddf66d0c99957ac7f1ed518776f7e0fe
parentc74058300c76d7afa316453c03e5776b3a9155a8 (diff)
downloadglibc-b99b892f6854b98bac5a581cbd20a6a7ed2e2470.tar.gz
glibc-b99b892f6854b98bac5a581cbd20a6a7ed2e2470.tar.xz
glibc-b99b892f6854b98bac5a581cbd20a6a7ed2e2470.zip
Fix stub setrlimit implementation.
-rw-r--r--ChangeLog3
-rw-r--r--resource/setrlimit.c9
2 files changed, 7 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d2a25d582..6da92f39db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2013-05-06  Roland McGrath  <roland@hack.frob.com>
 
+	* resource/setrlimit.c (__setrlimit): Renamed from setrlimit.
+	(setrlimit): Define as weak alias.
+
 	* sysdeps/posix/truncate.c (__truncate): Renamed from truncate.
 	Call __ names for open, ftruncate, and close.
 	For LENGTH==0 case, just use O_TRUNC rather than calling ftruncate.
diff --git a/resource/setrlimit.c b/resource/setrlimit.c
index e7924ff96f..b8496b1548 100644
--- a/resource/setrlimit.c
+++ b/resource/setrlimit.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-2013 Free Software Foundation, Inc.
+/* Set process resource limits.  Stub version.
+   Copyright (C) 1991-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,13 +24,11 @@
    Only the super-user can increase hard limits.
    Return 0 if successful, -1 if not (and sets errno).  */
 int
-setrlimit (resource, rlimits)
-     enum __rlimit_resource resource;
-     const struct rlimit *rlimits;
+__setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
 {
   __set_errno (ENOSYS);
   return -1;
 }
-
+weak_alias (__setrlimit, setrlimit)
 
 stub_warning (setrlimit)