opkg: disable the use of vfork for the host build
[librecmc/librecmc.git] / package / system / opkg / patches / 280-use-vfork.patch
1 --- a/libbb/gz_open.c
2 +++ b/libbb/gz_open.c
3 @@ -29,7 +29,12 @@
4  #include <unistd.h>
5  #include "libbb.h"
6  
7 +#ifdef OPKG_USE_VFORK
8 +static const int gz_use_vfork = OPKG_USE_VFORK;
9 +#else
10  static int gz_use_vfork;
11 +#endif
12 +
13  
14  FILE *
15  gz_open(FILE *compressed_file, int *pid)
16 @@ -38,7 +43,9 @@ gz_open(FILE *compressed_file, int *pid)
17         off_t floc;
18         int cfile = -1;
19  
20 +#ifndef OPKG_USE_VFORK
21         gz_use_vfork = (getenv("OPKG_USE_VFORK") != NULL);
22 +#endif
23  
24         if (gz_use_vfork) {
25                 /* Create a new file descriptor for the input stream