mirror of
				https://github.com/rofl0r/proxychains-ng.git
				synced 2025-11-04 09:06:05 +00:00 
			
		
		
		
	
							
								
								
									
										11
									
								
								src/core.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/core.c
									
									
									
									
									
								
							@@ -785,8 +785,12 @@ void proxy_freeaddrinfo(struct addrinfo *res) {
 | 
			
		||||
	free(res);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef IS_MAC
 | 
			
		||||
/* getservbyname on mac is using thread local storage, so we dont need mutex */
 | 
			
		||||
#if defined(IS_MAC) || defined(IS_OPENBSD)
 | 
			
		||||
#ifdef IS_OPENBSD /* OpenBSD has its own incompatible getservbyname_r */
 | 
			
		||||
#define getservbyname_r mygetservbyname_r
 | 
			
		||||
#endif
 | 
			
		||||
/* getservbyname on mac is using thread local storage, so we dont need mutex 
 | 
			
		||||
   TODO: check if the same applies to OpenBSD */
 | 
			
		||||
static int getservbyname_r(const char* name, const char* proto, struct servent* result_buf, 
 | 
			
		||||
			   char* buf, size_t buflen, struct servent** result) {
 | 
			
		||||
	PFUNC();
 | 
			
		||||
@@ -853,6 +857,9 @@ int proxy_getaddrinfo(const char *node, const char *service, const struct addrin
 | 
			
		||||
		p->ai_flags = hints->ai_flags;
 | 
			
		||||
		p->ai_protocol = hints->ai_protocol;
 | 
			
		||||
	} else {
 | 
			
		||||
#ifndef AI_V4MAPPED
 | 
			
		||||
#define AI_V4MAPPED 0
 | 
			
		||||
#endif
 | 
			
		||||
		p->ai_flags = (AI_V4MAPPED | AI_ADDRCONFIG);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user