[Lldb-commits] [lldb] r300610 - Fix Windows bot failure

Chris Bieneman via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 18 15:21:46 PDT 2017


Ah! Missing include then. I'll fix it correctly.

-Chris

> On Apr 18, 2017, at 3:18 PM, Adrian McCarthy <amccarth at google.com> wrote:
> 
> Actually, Windows does have `struct timespec`.  It's defined in `<time.h>` and `<ctime>`.
> 
> https://msdn.microsoft.com/en-us/library/mt633792.aspx <https://msdn.microsoft.com/en-us/library/mt633792.aspx>
> 
> I suspect somebody had suppressed it for some reason.
> 
> On Tue, Apr 18, 2017 at 2:47 PM, Chris Bieneman via lldb-commits <lldb-commits at lists.llvm.org <mailto:lldb-commits at lists.llvm.org>> wrote:
> Author: cbieneman
> Date: Tue Apr 18 16:47:50 2017
> New Revision: 300610
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=300610&view=rev <http://llvm.org/viewvc/llvm-project?rev=300610&view=rev>
> Log:
> Fix Windows bot failure
> 
> timespec is not available on Windows, and we should use size_t instead of nfds_t.
> 
> Modified:
>     lldb/trunk/source/Host/common/MainLoop.cpp
> 
> Modified: lldb/trunk/source/Host/common/MainLoop.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/MainLoop.cpp?rev=300610&r1=300609&r2=300610&view=diff <http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/MainLoop.cpp?rev=300610&r1=300609&r2=300610&view=diff>
> ==============================================================================
> --- lldb/trunk/source/Host/common/MainLoop.cpp (original)
> +++ lldb/trunk/source/Host/common/MainLoop.cpp Tue Apr 18 16:47:50 2017
> @@ -33,7 +33,14 @@
> 
>  #if !HAVE_PPOLL && !HAVE_SYS_EVENT_H
> 
> -int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts,
> +#ifdef LLVM_ON_WIN32
> +struct timespec {
> +  time_t       tv_sec;
> +  suseconds_t  tv_nsec;
> +};
> +#endif
> +
> +int ppoll(struct pollfd *fds, size_t nfds, const struct timespec *timeout_ts,
>            const sigset_t *) {
>    int timeout =
>        (timeout_ts == nullptr)
> 
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org <mailto:lldb-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits>
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170418/060fa505/attachment.html>


More information about the lldb-commits mailing list