]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
SPARC: add prlimit and prlimit64 in <bits/resource.h> (BZ #16943)
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 15 May 2014 22:04:41 +0000 (00:04 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 15 May 2014 22:17:22 +0000 (00:17 +0200)
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>

(cherry picked from commit d16e6ec7ca2c861ba681e3a2fbd431725774292e)

ChangeLog
NEWS
sysdeps/unix/sysv/linux/sparc/bits/resource.h

index 4f0c034d4668ee15a0b44bf6a4889655dd6ebfe8..7e235ac392cb4df65a36fa87d11daa4c55354edb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-16  Aurelien Jarno  <aurelien@aurel32.net>
+
+       [BZ #16943]
+       * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Declare prlimit
+       and prlimit64.
+
 2014-05-06  Aurelien Jarno  <aurelien@aurel32.net>
 
         [BZ# 16916]
diff --git a/NEWS b/NEWS
index a182e4c66afc1d89b71f58a49fa8127c69d945a4..7703b6ee1c2d69a27178720148fece2de9e1717d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,7 +8,7 @@ using `glibc' in the "product" field.
 Version 2.17.1
 
 * The following bugs are resolved with this release:
-  15003, 15006, 15073, 15122, 15759, 16510, 16885, 16916.
+  15003, 15006, 15073, 15122, 15759, 16510, 16885, 16916, 16943.
 
 \f
 Version 2.17
index 89fad8feb66a8867a370f83dab93a3dcd255a661..08b20559afe169b739a134589ef343b9565a339e 100644 (file)
@@ -253,3 +253,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