Implement getentropy for Cygwin
* miscfuncs.cc (getentropy): Move fhandler_dev_random::crypt_gen_random here and rename to getentropy. Fix type and return values to match getentropy requirements. * miscfuncs.h (getentropy): Add prototype. * fhandler.h (fhandler_dev_random::crypt_gen_random): Remove prototype. * fhandler_random.cc (fhandler_dev_random::crypt_gen_random): Drop. (fhandler_dev_random::write): Use getentropy instead. (fhandler_dev_random::read): Ditto. * fhandler_socket.cc (fhandler_socket::af_local_set_secret): Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -1731,8 +1731,6 @@ class fhandler_dev_random: public fhandler_base
|
||||
void __reg3 read (void *ptr, size_t& len);
|
||||
off_t lseek (off_t, int) { return 0; }
|
||||
|
||||
static bool crypt_gen_random (void *ptr, size_t len);
|
||||
|
||||
fhandler_dev_random () : fhandler_base () {}
|
||||
fhandler_dev_random (void *) {}
|
||||
|
||||
|
Reference in New Issue
Block a user