mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2025-09-02 22:06:58 +00:00
replace getservbyname_r ifdef hacks with configure check
this should make it work automatically on any new platform without having to add yet another ifdef hack. should fix issues with android (#265). additionally the code for the systems lacking GNU-compatible getservbyname_r() is now guarded with a mutex, which prevents possible races, therefore resolving the ancient "TODO" item.
This commit is contained in:
3
configure
vendored
3
configure
vendored
@ -149,6 +149,9 @@ issolaris() {
|
||||
$solaris_detected
|
||||
}
|
||||
|
||||
check_compile 'whether we have GNU-style getservbyname_r()' "-DHAVE_GNU_GETSERVBYNAME_R" \
|
||||
'#define _GNU_SOURCE\n#include <netdb.h>\nint main() {\nstruct servent *se = 0;struct servent se_buf;char buf[1024];\ngetservbyname_r("foo", (void*) 0, &se_buf, buf, sizeof(buf), &se);\nreturn 0;}'
|
||||
|
||||
check_define __APPLE__ && {
|
||||
mac_detected=true
|
||||
check_define __x86_64__ && mac_64=true
|
||||
|
Reference in New Issue
Block a user