X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fmingw-hdep.c;h=43d99747659e98b6ef9cb6d842737f2454d1b767;hb=b4991d292edd84c16bd2050bd071198ceae764fe;hp=44fb22e9a161b1bceaaf2bf3b2de368acfe3a3a7;hpb=5db2718ce48c497e317787caebacd019da59c3b0;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/mingw-hdep.c b/gdb/mingw-hdep.c index 44fb22e9a1..43d9974765 100644 --- a/gdb/mingw-hdep.c +++ b/gdb/mingw-hdep.c @@ -1,6 +1,6 @@ /* Host support routines for MinGW, for GDB, the GNU debugger. - Copyright (C) 2006-2019 Free Software Foundation, Inc. + Copyright (C) 2006-2020 Free Software Foundation, Inc. This file is part of GDB. @@ -20,9 +20,9 @@ #include "defs.h" #include "main.h" #include "serial.h" -#include "event-loop.h" +#include "gdbsupport/event-loop.h" -#include "gdb_select.h" +#include "gdbsupport/gdb_select.h" #include @@ -64,6 +64,17 @@ gdb_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, int num_ready; size_t indx; + if (n == 0) + { + /* The MS API says that the first argument to + WaitForMultipleObjects cannot be zero. That's why we just + use a regular Sleep here. */ + if (timeout != NULL) + Sleep (timeout->tv_sec * 1000 + timeout->tv_usec / 1000); + + return 0; + } + num_ready = 0; num_handles = 0; num_scbs = 0;