summaryrefslogtreecommitdiffstats
path: root/package/system
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-08-28 14:18:14 +0200
committerFelix Fietkau <nbd@nbd.name>2016-08-28 14:18:54 +0200
commit763f5d787316ec1b041450a644ecd9416f11e94f (patch)
treef826433ffa172a1b87eb831822e41677e03e471c /package/system
parent3e4d0e3e77dcf9b2116e5ed53f30e2bf53b1c6b7 (diff)
downloadmaster-31e0f0ae-763f5d787316ec1b041450a644ecd9416f11e94f.tar.gz
master-31e0f0ae-763f5d787316ec1b041450a644ecd9416f11e94f.tar.bz2
master-31e0f0ae-763f5d787316ec1b041450a644ecd9416f11e94f.zip
opkg: use vfork on gz_open by default (FS#120)
Reduces memory consumption and binary size Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/system')
-rw-r--r--package/system/opkg/patches/280-use-vfork.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/system/opkg/patches/280-use-vfork.patch b/package/system/opkg/patches/280-use-vfork.patch
new file mode 100644
index 0000000000..1c46f52b02
--- /dev/null
+++ b/package/system/opkg/patches/280-use-vfork.patch
@@ -0,0 +1,20 @@
+--- a/libbb/gz_open.c
++++ b/libbb/gz_open.c
+@@ -29,7 +29,7 @@
+ #include <unistd.h>
+ #include "libbb.h"
+
+-static int gz_use_vfork;
++static const int gz_use_vfork = 1;
+
+ FILE *
+ gz_open(FILE *compressed_file, int *pid)
+@@ -38,8 +38,6 @@ gz_open(FILE *compressed_file, int *pid)
+ off_t floc;
+ int cfile = -1;
+
+- gz_use_vfork = (getenv("OPKG_USE_VFORK") != NULL);
+-
+ if (gz_use_vfork) {
+ /* Create a new file descriptor for the input stream
+ * (it *must* be associated with a file), and lseek()