summaryrefslogtreecommitdiffstats
path: root/package/system/opkg/patches/280-use-vfork.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/system/opkg/patches/280-use-vfork.patch')
-rw-r--r--package/system/opkg/patches/280-use-vfork.patch19
1 files changed, 12 insertions, 7 deletions
diff --git a/package/system/opkg/patches/280-use-vfork.patch b/package/system/opkg/patches/280-use-vfork.patch
index 1c46f52b02..fc6058a701 100644
--- a/package/system/opkg/patches/280-use-vfork.patch
+++ b/package/system/opkg/patches/280-use-vfork.patch
@@ -1,20 +1,25 @@
--- a/libbb/gz_open.c
+++ b/libbb/gz_open.c
-@@ -29,7 +29,7 @@
+@@ -29,7 +29,12 @@
#include <unistd.h>
#include "libbb.h"
--static int gz_use_vfork;
-+static const int gz_use_vfork = 1;
++#ifdef OPKG_USE_VFORK
++static const int gz_use_vfork = OPKG_USE_VFORK;
++#else
+ static int gz_use_vfork;
++#endif
++
FILE *
gz_open(FILE *compressed_file, int *pid)
-@@ -38,8 +38,6 @@ gz_open(FILE *compressed_file, int *pid)
+@@ -38,7 +43,9 @@ gz_open(FILE *compressed_file, int *pid)
off_t floc;
int cfile = -1;
-- gz_use_vfork = (getenv("OPKG_USE_VFORK") != NULL);
--
++#ifndef OPKG_USE_VFORK
+ gz_use_vfork = (getenv("OPKG_USE_VFORK") != NULL);
++#endif
+
if (gz_use_vfork) {
/* Create a new file descriptor for the input stream
- * (it *must* be associated with a file), and lseek()