diff mbox series

[uclibc-ng-devel] guard new syscall prlimit

Message ID 20220203190006.23208-1-lancethepants@gmail.com
State Superseded
Headers show
Series [uclibc-ng-devel] guard new syscall prlimit | expand

Commit Message

Lance Fredrickson Feb. 3, 2022, 7 p.m. UTC
This patch guards the newly added syscall wrapper prlimit for kernels that predate this feature.

Lance Fredrickson

---
 libc/sysdeps/linux/common/prlimit.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/libc/sysdeps/linux/common/prlimit.c b/libc/sysdeps/linux/common/prlimit.c
index cdb64ba0d..dbb0de0d3 100644
--- a/libc/sysdeps/linux/common/prlimit.c
+++ b/libc/sysdeps/linux/common/prlimit.c
@@ -18,6 +18,7 @@ 
 #include <sys/resource.h>
 #include <sysdep.h>
 
+#ifdef __NR_prlimit
 int
 prlimit (__pid_t pid, enum __rlimit_resource resource,
 	     const struct rlimit *new_rlimit, struct rlimit *old_rlimit)
@@ -25,3 +26,4 @@  prlimit (__pid_t pid, enum __rlimit_resource resource,
   return INLINE_SYSCALL (prlimit64, 4, pid, resource, new_rlimit,
 			      old_rlimit);
 }
+#endif