available, possibly as compat, anyway).
git-svn-id: file:///svn/unbound/trunk@3607
be551aaa-1e26-0410-a405-
d3ace91eadb9
26 January 2016: Wouter
- Fix #734: chown the pidfile if it resides inside the chroot.
+ - Use arc4random instead of random in tests (because it is
+ available, possibly as compat, anyway).
25 January 2016: Wouter
- Fix #738: Swig should not be invoked with CPPFLAGS.
}
i=0;
if(bindport == 0) {
- bindport = 1024 + random()%64000;
+ bindport = 1024 + arc4random()%64000;
i = 100;
}
while(1) {
#endif
if(i--==0)
fatal_exit("cannot bind any port");
- bindport = 1024 + random()%64000;
+ bindport = 1024 + arc4random()%64000;
} else break;
}
fd_set_nonblock(s);
verbosity = 0;
log_init(0, 0, 0);
log_ident_set("delayer");
- srandom(time(NULL) ^ getpid());
if(argc == 1) usage(argv);
while( (c=getopt(argc, argv, "b:d:f:hm:p:")) != -1) {
switch(c) {
if (RAND_bytes((unsigned char*)&r, (int)sizeof(r)) == 1) {
return r;
}
- return (int)random();
+ return arc4random();
}
/** send the TCP queries and print answers */