mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:32:44 +00:00 
			
		
		
		
	LibC: Fix get{sock,peer}name to match their kernel-side prototypes
In f4302b58fb, the kernel-side syscalls (e.g Process::sys$getsockname)
were updated to use SC_get{sock,peer}name_params, but the libc
functions were not updated.
			
			
This commit is contained in:
		
							parent
							
								
									9e74793ce2
								
							
						
					
					
						commit
						2ac3d33c63
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -108,13 +108,15 @@ int setsockopt(int sockfd, int level, int option, const void* value, socklen_t v | |||
| 
 | ||||
| int getsockname(int sockfd, struct sockaddr* addr, socklen_t* addrlen) | ||||
| { | ||||
|     int rc = syscall(SC_getsockname, sockfd, addr, addrlen); | ||||
|     Syscall::SC_getsockname_params params { sockfd, addr, addrlen }; | ||||
|     int rc = syscall(SC_getsockname, ¶ms); | ||||
|     __RETURN_WITH_ERRNO(rc, rc, -1); | ||||
| } | ||||
| 
 | ||||
| int getpeername(int sockfd, struct sockaddr* addr, socklen_t* addrlen) | ||||
| { | ||||
|     int rc = syscall(SC_getpeername, sockfd, addr, addrlen); | ||||
|     Syscall::SC_getpeername_params params { sockfd, addr, addrlen }; | ||||
|     int rc = syscall(SC_getpeername, ¶ms); | ||||
|     __RETURN_WITH_ERRNO(rc, rc, -1); | ||||
| } | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yonatan Goldschmidt
						Yonatan Goldschmidt