mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2025-09-02 22:06:58 +00:00
initialize rand seed with nano-second granularity
in scenarios where one is to spin up several processes with the same proxy list in random mode, all processes started in the same second would pick the same proxy due to using the same srand() seed. closes #380
This commit is contained in:
3
configure
vendored
3
configure
vendored
@ -165,6 +165,9 @@ check_compile 'whether we have pipe2() and O_CLOEXEC' "-DHAVE_PIPE2" \
|
||||
check_compile 'whether we have SOCK_CLOEXEC' "-DHAVE_SOCK_CLOEXEC" \
|
||||
'#define _GNU_SOURCE\n#include <sys/socket.h>\nint main() {\nreturn socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, 0);}'
|
||||
|
||||
check_compile 'whether we have clock_gettime' "-DHAVE_CLOCK_GETTIME" \
|
||||
'#define _GNU_SOURCE\n#include <time.h>\nint main() {\nstruct timespec now;clock_gettime(CLOCK_REALTIME, &now);\nreturn now.tv_sec ^ now.tv_nsec;}'
|
||||
|
||||
check_define __APPLE__ && {
|
||||
mac_detected=true
|
||||
check_define __x86_64__ && mac_64=true
|
||||
|
Reference in New Issue
Block a user