2016-08-28 12:18:14 +00:00
|
|
|
--- a/libbb/gz_open.c
|
|
|
|
+++ b/libbb/gz_open.c
|
2016-08-28 12:33:48 +00:00
|
|
|
@@ -29,7 +29,12 @@
|
2016-08-28 12:18:14 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
#include "libbb.h"
|
|
|
|
|
2016-08-28 12:33:48 +00:00
|
|
|
+#ifdef OPKG_USE_VFORK
|
|
|
|
+static const int gz_use_vfork = OPKG_USE_VFORK;
|
|
|
|
+#else
|
|
|
|
static int gz_use_vfork;
|
|
|
|
+#endif
|
|
|
|
+
|
2016-08-28 12:18:14 +00:00
|
|
|
|
|
|
|
FILE *
|
|
|
|
gz_open(FILE *compressed_file, int *pid)
|
2016-08-28 12:33:48 +00:00
|
|
|
@@ -38,7 +43,9 @@ gz_open(FILE *compressed_file, int *pid)
|
2016-08-28 12:18:14 +00:00
|
|
|
off_t floc;
|
|
|
|
int cfile = -1;
|
|
|
|
|
2016-08-28 12:33:48 +00:00
|
|
|
+#ifndef OPKG_USE_VFORK
|
|
|
|
gz_use_vfork = (getenv("OPKG_USE_VFORK") != NULL);
|
|
|
|
+#endif
|
|
|
|
|
2016-08-28 12:18:14 +00:00
|
|
|
if (gz_use_vfork) {
|
|
|
|
/* Create a new file descriptor for the input stream
|