opkg: disable the use of vfork for the host build
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
763f5d7873
commit
02e3c718e9
@ -109,7 +109,7 @@ endef
|
|||||||
|
|
||||||
Package/opkg-smime/conffiles = $(Package/opkg/conffiles)
|
Package/opkg-smime/conffiles = $(Package/opkg/conffiles)
|
||||||
|
|
||||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections
|
TARGET_CFLAGS += -ffunction-sections -fdata-sections -DOPKG_USE_VFORK=1
|
||||||
EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
|
EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
--- a/libbb/gz_open.c
|
--- a/libbb/gz_open.c
|
||||||
+++ b/libbb/gz_open.c
|
+++ b/libbb/gz_open.c
|
||||||
@@ -29,7 +29,7 @@
|
@@ -29,7 +29,12 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
|
|
||||||
-static int gz_use_vfork;
|
+#ifdef OPKG_USE_VFORK
|
||||||
+static const int gz_use_vfork = 1;
|
+static const int gz_use_vfork = OPKG_USE_VFORK;
|
||||||
|
+#else
|
||||||
|
static int gz_use_vfork;
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
|
||||||
FILE *
|
FILE *
|
||||||
gz_open(FILE *compressed_file, int *pid)
|
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;
|
off_t floc;
|
||||||
int cfile = -1;
|
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) {
|
if (gz_use_vfork) {
|
||||||
/* Create a new file descriptor for the input stream
|
/* Create a new file descriptor for the input stream
|
||||||
* (it *must* be associated with a file), and lseek()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user