aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/genconfig.sh7
-rw-r--r--toys/posix/ulimit.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/scripts/genconfig.sh b/scripts/genconfig.sh
index 5b0715f4..5e7d1df2 100755
--- a/scripts/genconfig.sh
+++ b/scripts/genconfig.sh
@@ -90,6 +90,13 @@ EOF
int main(int argc, char *argv[]) { return fork(); }
EOF
echo -e '\tdepends on !TOYBOX_MUSL_NOMMU_IS_BROKEN'
+
+ probesymbol TOYBOX_PRLIMIT << EOF
+ #include <sys/time.h>
+ #include <sys/resource.h>
+
+ int main(int argc, char *argv[]) { prlimit(0, 0, 0, 0); }
+EOF
}
genconfig()
diff --git a/toys/posix/ulimit.c b/toys/posix/ulimit.c
index b14cd933..b4d8e946 100644
--- a/toys/posix/ulimit.c
+++ b/toys/posix/ulimit.c
@@ -21,6 +21,7 @@ USE_ULIMIT(NEWTOY(ulimit, ">1P#<1SHavutsrRqpnmlifedc[-SH][!apvutsrRqnmlifedc]",
config ULIMIT
bool "ulimit"
default y
+ depends on TOYBOX_PRLIMIT
help
usage: ulimit [-P PID] [-SHRacdefilmnpqrstuv] [LIMIT]