File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change
1
+ Guard MSVC-specific code in socketmodule.c with ``#ifdef _MSC_VER ``.
Original file line number Diff line number Diff line change @@ -559,15 +559,18 @@ select_error(void)
559
559
# define SET_SOCK_ERROR (err ) WSASetLastError(err)
560
560
# define SOCK_TIMEOUT_ERR WSAEWOULDBLOCK
561
561
# define SOCK_INPROGRESS_ERR WSAEWOULDBLOCK
562
- # define SUPPRESS_DEPRECATED_CALL __pragma(warning(suppress: 4996))
563
562
#else
564
563
# define GET_SOCK_ERROR errno
565
564
# define SET_SOCK_ERROR (err ) do { errno = err; } while (0)
566
565
# define SOCK_TIMEOUT_ERR EWOULDBLOCK
567
566
# define SOCK_INPROGRESS_ERR EINPROGRESS
568
- # define SUPPRESS_DEPRECATED_CALL
569
567
#endif
570
568
569
+ #ifdef _MSC_VER
570
+ # define SUPPRESS_DEPRECATED_CALL __pragma(warning(suppress: 4996))
571
+ #else
572
+ # define SUPPRESS_DEPRECATED_CALL
573
+ #endif
571
574
572
575
#ifdef MS_WINDOWS
573
576
/* Does WSASocket() support the WSA_FLAG_NO_HANDLE_INHERIT flag? */
You can’t perform that action at this time.
0 commit comments