aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-08-28 14:33:48 +0200
committerFelix Fietkau <nbd@nbd.name>2016-08-28 14:34:40 +0200
commit02e3c718e9ad0c14aa3cf359ba2a4763e81df805 (patch)
tree86b7f7cd1ad4bd2a2b0505f7c987a5afa7abf6e2 /package
parent763f5d787316ec1b041450a644ecd9416f11e94f (diff)
downloadupstream-02e3c718e9ad0c14aa3cf359ba2a4763e81df805.tar.gz
upstream-02e3c718e9ad0c14aa3cf359ba2a4763e81df805.tar.bz2
upstream-02e3c718e9ad0c14aa3cf359ba2a4763e81df805.zip
opkg: disable the use of vfork for the host build
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r--package/system/opkg/Makefile2
-rw-r--r--package/system/opkg/patches/280-use-vfork.patch19
2 files changed, 13 insertions, 8 deletions
diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile
index 67ceb7cafc..446463ec85 100644
--- a/package/system/opkg/Makefile
+++ b/package/system/opkg/Makefile
@@ -109,7 +109,7 @@ endef
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)
CONFIGURE_ARGS += \
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()