getentropy per OpenBSD http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2 getrandom per Linux http://man7.org/linux/man-pages/man2/getrandom.2.html Note that GRND_NONBLOCK is not handled
		
			
				
	
	
		
			30 lines
		
	
	
		
			581 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			581 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /* sys/random.h header file for Cygwin.
 | |
| 
 | |
| This file is part of Cygwin.
 | |
| 
 | |
| This software is a copyrighted work licensed under the terms of the
 | |
| Cygwin license.  Please consult the file "CYGWIN_LICENSE" for details. */
 | |
| 
 | |
| #ifndef _SYS_RANDOM_H
 | |
| #define _SYS_RANDOM_H
 | |
| 
 | |
| #include <_ansi.h>
 | |
| #include <sys/types.h>
 | |
| 
 | |
| /* getrandom flags */
 | |
| #define GRND_NONBLOCK	1
 | |
| #define GRND_RANDOM	2
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| extern "C" {
 | |
| #endif
 | |
| 
 | |
| ssize_t getrandom (void *__ptr, size_t __len, unsigned int __flags);
 | |
| int getentropy (void *__ptr, size_t __len);
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| }
 | |
| #endif
 | |
| 
 | |
| #endif /* _SYS_RANDOM_H */
 |