about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2014-05-16 00:04:41 +0200
committerAurelien Jarno <aurelien@aurel32.net>2014-05-16 00:07:32 +0200
commitd16e6ec7ca2c861ba681e3a2fbd431725774292e (patch)
tree4b59175d1024f6bebacf996511f983ee4f3e5f7a /sysdeps
parentd0583c403952630c534b0605ff7d69af5ec473cc (diff)
downloadglibc-d16e6ec7ca2c861ba681e3a2fbd431725774292e.tar.gz
glibc-d16e6ec7ca2c861ba681e3a2fbd431725774292e.tar.xz
glibc-d16e6ec7ca2c861ba681e3a2fbd431725774292e.zip
SPARC: add prlimit and prlimit64 in <bits/resource.h> (BZ #16943)
prlimit and prlimit64 have been added in the main <bits/resource.h>, but
not in the SPARC specific version. Fix that.

Note: this is Debian bug#703559, reported by Emilio Pozuelo Monfort
<pochu@debian.org>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/resource.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/resource.h b/sysdeps/unix/sysv/linux/sparc/bits/resource.h
index aa201fe148..518264fa44 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/resource.h
@@ -252,3 +252,30 @@ enum __priority_which
   PRIO_USER = 2			/* WHO is a user ID.  */
 #define PRIO_USER PRIO_USER
 };
+
+__BEGIN_DECLS
+
+#ifdef __USE_GNU
+/* Modify and return resource limits of a process atomically.  */
+# ifndef __USE_FILE_OFFSET64
+extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
+		    const struct rlimit *__new_limit,
+		    struct rlimit *__old_limit) __THROW;
+# else
+#  ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
+				     enum __rlimit_resource __resource,
+				     const struct rlimit *__new_limit,
+				     struct rlimit *__old_limit), prlimit64);
+#  else
+#   define prlimit prlimit64
+#  endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
+		      const struct rlimit64 *__new_limit,
+		      struct rlimit64 *__old_limit) __THROW;
+# endif
+#endif
+
+__END_DECLS