mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-04 20:38:50 +01:00
* cipher.c (fast_random_poll): Only use times() if we HAVE_TIMES.
This commit is contained in:
parent
7ee7c76121
commit
f20f778c85
@ -1,3 +1,7 @@
|
||||
2003-05-08 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* cipher.c (fast_random_poll): Only use times() if we HAVE_TIMES.
|
||||
|
||||
2003-04-15 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* md.c (md_start_debug): Need to open the file in binary mode.
|
||||
|
@ -44,6 +44,9 @@
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
#include <sys/times.h>
|
||||
#endif
|
||||
#ifdef HAVE_TIMES
|
||||
#include <sys/times.h>
|
||||
#endif
|
||||
#ifdef HAVE_GETRUSAGE
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
@ -650,14 +653,13 @@ fast_random_poll()
|
||||
add_randomness( &tv.tv_sec, sizeof(tv.tv_sec), 1 );
|
||||
add_randomness( &tv.tv_nsec, sizeof(tv.tv_nsec), 1 );
|
||||
}
|
||||
#else /* use times */
|
||||
#ifndef HAVE_DOSISH_SYSTEM
|
||||
#elif defined (HAVE_TIMES)
|
||||
{ struct tms buf;
|
||||
times( &buf );
|
||||
if( times( &buf ) == -1 )
|
||||
BUG();
|
||||
add_randomness( &buf, sizeof buf, 1 );
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_GETRUSAGE
|
||||
#ifndef RUSAGE_SELF
|
||||
#ifdef __GCC__
|
||||
|
Loading…
Reference in New Issue
Block a user