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
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/timer.h"
|
#include "wx/timer.h"
|
||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
|
#include "wx/filefn.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/apptrait.h"
|
#include "wx/apptrait.h"
|
||||||
@@ -528,7 +529,7 @@ wxSocketImpl *wxSocketImpl::Accept(wxSocketBase& wxsocket)
|
|||||||
WX_SOCKLEN_T fromlen = sizeof(from);
|
WX_SOCKLEN_T fromlen = sizeof(from);
|
||||||
const wxSOCKET_T fd = accept(m_fd, &from.addr, &fromlen);
|
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
|
// accepting is similar to reading in the sense that it resets "ready for
|
||||||
// read" flag on the socket
|
// read" flag on the socket
|
||||||
|
Reference in New Issue
Block a user