Skip to content

Commit c2af281

Browse files
authored
Use <winsock2.h> instead of legacy <winsock.h> (php#19037)
This also omits defining unused HAVE_WINSOCK_H macro when building ext/sockets.
1 parent aa366b5 commit c2af281

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ext/mysqlnd/mysqlnd_vio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#ifndef PHP_WIN32
2727
#include <netinet/tcp.h>
2828
#else
29-
#include <winsock.h>
29+
#include <winsock2.h>
3030
#endif
3131

3232

ext/sockets/config.w32

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ ARG_ENABLE("sockets", "SOCKETS support", "no");
44

55
if (PHP_SOCKETS != "no") {
66
if (CHECK_LIB("ws2_32.lib", "sockets", PHP_SOCKETS)
7-
&& CHECK_LIB("Iphlpapi.lib", "sockets", PHP_SOCKETS)
8-
&& CHECK_HEADER_ADD_INCLUDE("winsock.h", "CFLAGS_SOCKETS")) {
7+
&& CHECK_LIB("Iphlpapi.lib", "sockets", PHP_SOCKETS)) {
98
EXTENSION('sockets', 'sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c', PHP_SOCKETS_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
109
AC_DEFINE('HAVE_SOCKETS', 1, "Define to 1 if the PHP extension 'sockets' is available.");
1110
PHP_INSTALL_HEADERS("ext/sockets", "php_sockets.h windows_common.h");

0 commit comments

Comments
 (0)