From 74df699ff1ab913d9ca58a198125f5ad561d289f Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 31 Oct 2024 03:17:36 +0800 Subject: [PATCH] fixes #24371; incorrect importc wrapper incompatible with gcc 14 on Windows (#24388) fixes #24371 --- lib/windows/winlean.nim | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/windows/winlean.nim b/lib/windows/winlean.nim index 79681376b227..11cf607a4245 100644 --- a/lib/windows/winlean.nim +++ b/lib/windows/winlean.nim @@ -449,14 +449,9 @@ type SockLen* = cuint -when defined(cpp): - type - Timeval* {.importc: "timeval", header: "".} = object - tv_sec*, tv_usec*: int32 -else: - type - Timeval* = object - tv_sec*, tv_usec*: int32 +type + Timeval* {.importc: "struct timeval", header: "".} = object + tv_sec*, tv_usec*: int32 var SOMAXCONN* {.importc, header: "winsock2.h".}: cint