openwrtv3/package/system/opkg/patches/280-use-vfork.patch
Felix Fietkau 02e3c718e9 opkg: disable the use of vfork for the host build
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-08-28 14:34:40 +02:00

25 lines
531 B
Diff

--- a/libbb/gz_open.c
+++ b/libbb/gz_open.c
@@ -29,7 +29,12 @@
#include <unistd.h>
#include "libbb.h"
+#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,7 +43,9 @@ gz_open(FILE *compressed_file, int *pid)
off_t floc;
int cfile = -1;
+#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