Move arc4random Cygwin only code to Cygwin
Keep the Newlib arc4random.c identical to the OpenBSD upstream version. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>.
This commit is contained in:
		
				
					committed by
					
						 Corinna Vinschen
						Corinna Vinschen
					
				
			
			
				
	
			
			
			
						parent
						
							2519f0ef0c
						
					
				
				
					commit
					08537d88f6
				
			| @@ -193,18 +193,3 @@ arc4random_buf(void *buf, size_t n) | |||||||
| 	_rs_random_buf(buf, n); | 	_rs_random_buf(buf, n); | ||||||
| 	_ARC4_UNLOCK(); | 	_ARC4_UNLOCK(); | ||||||
| } | } | ||||||
|  |  | ||||||
| #ifdef __CYGWIN__ |  | ||||||
| /* Exported functions removed from OpenBSD in the meantime.  Keep them, |  | ||||||
|    but make them non-functional.  They don't return a value anyway. */ |  | ||||||
| void |  | ||||||
| arc4random_stir(void) |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| void |  | ||||||
| arc4random_addrandom(u_char *dat, int datlen) |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| #endif /* __CYGWIN__ */ |  | ||||||
|   | |||||||
| @@ -155,6 +155,7 @@ MT_SAFE_OBJECTS:= | |||||||
| # | # | ||||||
| DLL_OFILES:= \ | DLL_OFILES:= \ | ||||||
| 	advapi32.o \ | 	advapi32.o \ | ||||||
|  | 	arc4random_stir.o \ | ||||||
| 	assert.o \ | 	assert.o \ | ||||||
| 	autoload.o \ | 	autoload.o \ | ||||||
| 	base64.o \ | 	base64.o \ | ||||||
|   | |||||||
							
								
								
									
										24
									
								
								winsup/cygwin/libc/arc4random_stir.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								winsup/cygwin/libc/arc4random_stir.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | |||||||
|  | /* libc/arc4random_stir.c | ||||||
|  |  | ||||||
|  |    Copyright 2016 Red Hat, Inc. | ||||||
|  |  | ||||||
|  | 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. */ | ||||||
|  |  | ||||||
|  | #include <sys/types.h> | ||||||
|  |  | ||||||
|  | /* Exported functions removed from OpenBSD in the meantime.  Keep them, | ||||||
|  |    but make them non-functional.  They don't return a value anyway. */ | ||||||
|  |  | ||||||
|  | void | ||||||
|  | arc4random_stir(void) | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  | void | ||||||
|  | arc4random_addrandom(u_char *dat, int datlen) | ||||||
|  | { | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user