mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 14:34:27 -05:00 
			
		
		
		
	opkg: use vfork on gz_open by default (FS#120)
Reduces memory consumption and binary size Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
		
							parent
							
								
									3e4d0e3e77
								
							
						
					
					
						commit
						763f5d7873
					
				
							
								
								
									
										20
									
								
								package/system/opkg/patches/280-use-vfork.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								package/system/opkg/patches/280-use-vfork.patch
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,20 @@
 | 
			
		||||
--- a/libbb/gz_open.c
 | 
			
		||||
+++ b/libbb/gz_open.c
 | 
			
		||||
@@ -29,7 +29,7 @@
 | 
			
		||||
 #include <unistd.h>
 | 
			
		||||
 #include "libbb.h"
 | 
			
		||||
 
 | 
			
		||||
-static int gz_use_vfork;
 | 
			
		||||
+static const int gz_use_vfork = 1;
 | 
			
		||||
 
 | 
			
		||||
 FILE *
 | 
			
		||||
 gz_open(FILE *compressed_file, int *pid)
 | 
			
		||||
@@ -38,8 +38,6 @@ gz_open(FILE *compressed_file, int *pid)
 | 
			
		||||
 	off_t floc;
 | 
			
		||||
 	int cfile = -1;
 | 
			
		||||
 
 | 
			
		||||
-	gz_use_vfork = (getenv("OPKG_USE_VFORK") != NULL);
 | 
			
		||||
-
 | 
			
		||||
 	if (gz_use_vfork) {
 | 
			
		||||
 		/* 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