diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-09-20 12:29:39 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-09-20 12:29:39 (GMT) |
commit | f8ca82ac5b16009ef945379f1f3ac64544c2590b (patch) | |
tree | 68be39588a2ec7ef1b54fec71d354661501240b1 | |
parent | 32befc53df03408b95b8e1ace173a67f7278d259 (diff) | |
download | tk-f8ca82ac5b16009ef945379f1f3ac64544c2590b.zip tk-f8ca82ac5b16009ef945379f1f3ac64544c2590b.tar.gz tk-f8ca82ac5b16009ef945379f1f3ac64544c2590b.tar.bz2 |
Fix crash, seen on Cygwin: Tcl_Time still has 32-bit fields on Windows, this leads to a crash with gcc-11+ when loading win32 Tk in Cygwin Tcl.
-rw-r--r-- | generic/tkBind.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index da52c61..ba16aa3 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -792,9 +792,12 @@ GetButtonNumber( static Time CurrentTimeInMilliSecs(void) { - Tcl_Time now; - Tcl_GetTime(&now); - return ((Time) now.sec)*1000 + ((Time) now.usec)/1000; + struct { + Tcl_Time now; + Tcl_Time dummy; /* Spare, in case Tcl_Time has 32-bit fields */ + } t; + Tcl_GetTime(&t.now); + return ((Time) t.now.sec)*1000 + ((Time) t.now.usec)/1000; } static Info |