From 6700ea5ad2cc5fea563124063c0e907fc1eec78f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 27 Apr 2014 22:39:43 +0000 Subject: [PATCH] Fix warning about using "deprecated" close() in MSVC build. Use wxClose(), which is the same as _close() for MSVC. Closes #16212. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/socket.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/socket.cpp b/src/common/socket.cpp index bc2ec63eb4..2a39f71d71 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -34,6 +34,7 @@ #include "wx/utils.h" #include "wx/timer.h" #include "wx/module.h" + #include "wx/filefn.h" #endif #include "wx/apptrait.h" @@ -528,7 +529,7 @@ wxSocketImpl *wxSocketImpl::Accept(wxSocketBase& wxsocket) WX_SOCKLEN_T fromlen = sizeof(from); const wxSOCKET_T fd = accept(m_fd, &from.addr, &fromlen); - wxScopeGuard closeSocket = wxMakeGuard(close, fd); + wxScopeGuard closeSocket = wxMakeGuard(wxClose, fd); // accepting is similar to reading in the sense that it resets "ready for // read" flag on the socket