mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
main: update Winsock api version to 2.2 (#14909)
not been updated since php 4 whereas 2.2 is available even in Win2000.
This commit is contained in:
@@ -2073,7 +2073,7 @@ zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additi
|
||||
zend_module_entry *module;
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
WORD wVersionRequested = MAKEWORD(2, 0);
|
||||
WORD wVersionRequested = MAKEWORD(2, 2);
|
||||
WSADATA wsaData;
|
||||
|
||||
old_invalid_parameter_handler =
|
||||
@@ -2162,6 +2162,12 @@ zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additi
|
||||
fprintf(stderr, "\nwinsock.dll unusable. %d\n", WSAGetLastError());
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (UNEXPECTED(HIBYTE(wsaData.wVersion) != 2)) {
|
||||
fprintf(stderr, "\nversion not found in winsock.dll. %d\n", WSAGetLastError());
|
||||
WSACleanup();
|
||||
return FAILURE;
|
||||
}
|
||||
php_win32_signal_ctrl_handler_init();
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user