mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-20 20:04:19 +08:00
commit
8eba3003c6
35
recipes/patch/01-no-rlimit.patch
Normal file
35
recipes/patch/01-no-rlimit.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff -ru source/lib/getdtablesize.c source-new/lib/getdtablesize.c
|
||||
--- source/lib/getdtablesize.c 2015-03-06 16:31:45.000000000 -0800
|
||||
+++ source-new/lib/getdtablesize.c 2017-08-08 19:33:33.993874985 -0700
|
||||
@@ -106,15 +106,6 @@
|
||||
int
|
||||
getdtablesize (void)
|
||||
{
|
||||
- struct rlimit lim;
|
||||
-
|
||||
- if (getrlimit (RLIMIT_NOFILE, &lim) == 0
|
||||
- && 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX
|
||||
- && lim.rlim_cur != RLIM_INFINITY
|
||||
- && lim.rlim_cur != RLIM_SAVED_CUR
|
||||
- && lim.rlim_cur != RLIM_SAVED_MAX)
|
||||
- return lim.rlim_cur;
|
||||
-
|
||||
return INT_MAX;
|
||||
}
|
||||
|
||||
Only in source-new/lib: getdtablesize.c.orig
|
||||
diff -ru source/src/safe.c source-new/src/safe.c
|
||||
--- source/src/safe.c 2015-03-06 16:34:20.000000000 -0800
|
||||
+++ source-new/src/safe.c 2017-08-08 19:33:53.447430811 -0700
|
||||
@@ -92,11 +92,7 @@
|
||||
|
||||
static void init_dirfd_cache (void)
|
||||
{
|
||||
- struct rlimit nofile;
|
||||
-
|
||||
max_cached_fds = 8;
|
||||
- if (getrlimit (RLIMIT_NOFILE, &nofile) == 0)
|
||||
- max_cached_fds = MAX (nofile.rlim_cur / 4, max_cached_fds);
|
||||
|
||||
cached_dirfds = hash_initialize (max_cached_fds,
|
||||
NULL,
|
||||
38
recipes/patch/recipe.sh
Normal file
38
recipes/patch/recipe.sh
Normal file
@ -0,0 +1,38 @@
|
||||
VERSION=2.7.5
|
||||
TAR=http://ftp.gnu.org/gnu/patch/patch-$VERSION.tar.xz
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_update {
|
||||
echo "skipping update"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
|
||||
autoreconf
|
||||
./configure --host=${HOST} --prefix=/
|
||||
make
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_test {
|
||||
echo "skipping test"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
make clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
make DESTDIR="$dest" install
|
||||
$HOST-strip $1/bin/*
|
||||
rm -rf "$1/"{share,lib}
|
||||
skip=1
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user