aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/socket.c')
-rw-r--r--gcc/ada/socket.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c
index a265e01..8fc8415 100644
--- a/gcc/ada/socket.c
+++ b/gcc/ada/socket.c
@@ -803,4 +803,15 @@ const char * __gnat_gai_strerror(int errcode) {
#endif
+int __gnat_minus_500ms() {
+#if defined (_WIN32)
+ // Windows Server 2019 and Windows 8.0 do not need 500 millisecond socket
+ // timeout correction.
+ return !(IsWindows8OrGreater() && !IsWindowsServer()
+ || IsWindowsVersionOrGreater(10, 0, 17763));
+#else
+ return 0;
+#endif
+}
+
#endif /* defined(HAVE_SOCKETS) */