mirror of
				https://github.com/python/cpython.git
				synced 2025-11-01 06:01:29 +00:00 
			
		
		
		
	gh-92658: Add Hyper-V socket support (GH-92755)
This commit is contained in:
		
							parent
							
								
									5115a16831
								
							
						
					
					
						commit
						fbd11f3edd
					
				
					 6 changed files with 256 additions and 1 deletions
				
			
		|  | @ -76,6 +76,15 @@ struct SOCKADDR_BTH_REDEF { | |||
| # else | ||||
| typedef int socklen_t; | ||||
| # endif /* IPPROTO_IPV6 */ | ||||
| 
 | ||||
| /* Remove ifdef once Py_WINVER >= 0x0604
 | ||||
|  * socket.h only defines AF_HYPERV if _WIN32_WINNT is at that level or higher | ||||
|  * so for now it's just manually defined. | ||||
|  */ | ||||
| # ifndef AF_HYPERV | ||||
| #  define AF_HYPERV 34 | ||||
| # endif | ||||
| # include <hvsocket.h> | ||||
| #endif /* MS_WINDOWS */ | ||||
| 
 | ||||
| #ifdef HAVE_SYS_UN_H | ||||
|  | @ -288,6 +297,9 @@ typedef union sock_addr { | |||
| #ifdef HAVE_LINUX_TIPC_H | ||||
|     struct sockaddr_tipc tipc; | ||||
| #endif | ||||
| #ifdef AF_HYPERV | ||||
|     SOCKADDR_HV hv; | ||||
| #endif | ||||
| } sock_addr_t; | ||||
| 
 | ||||
| /* The object holding a socket.  It holds some extra information,
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jordan Borean
						Jordan Borean