aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-02-09 17:23:31 -0600
committerRob Landley <rob@landley.net>2016-02-09 17:23:31 -0600
commit2f3f26ea1ec581cd24a0778323eb0844f03fd6a3 (patch)
treef7ba43fcbe762a1eb95bc5bfefa8450fe36b56a6 /lib
parenta7a869c2d5f9398a6348dbeacbfec115a5b7d34e (diff)
downloadtoybox-2f3f26ea1ec581cd24a0778323eb0844f03fd6a3.tar.gz
Add ulimit.
This isn't a shell builtin, it uses prlimit to target any pid (without -P it defaults to $PPID, so acts like historical ulimit by default).
Diffstat (limited to 'lib')
-rw-r--r--lib/portability.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h
index eadd9961..53b08704 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -247,6 +247,16 @@ static inline void endutxent(void) {;}
#define O_PATH 010000000
#endif
+// Glibc won't give you linux-kernel constants unless you say "no, a BUD lite"
+// even though linux has nothing to do with the FSF and never has.
+#ifndef F_SETPIPE_SZ
+#define F_SETPIPE_SZ 1031
+#endif
+
+#ifndef F_GETPIPE_SZ
+#define F_GETPIPE_SZ 1032
+#endif
+
#if defined(__SIZEOF_DOUBLE__) && defined(__SIZEOF_LONG__) \
&& __SIZEOF_DOUBLE__ <= __SIZEOF_LONG__
typedef double FLOAT;