Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: third_party/libusb/src/libusb/os/threads_windows.h

Issue 1067093002: Don't define timespec in VS 2015 builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libusb/src/libusb/os/threads_windows.h
diff --git a/third_party/libusb/src/libusb/os/threads_windows.h b/third_party/libusb/src/libusb/os/threads_windows.h
index df8a0eeb03d2d08a91fa840e28363a440c693421..754bb2499c338eded2a9e9080c5b3627a27798bf 100644
--- a/third_party/libusb/src/libusb/os/threads_windows.h
+++ b/third_party/libusb/src/libusb/os/threads_windows.h
@@ -44,10 +44,13 @@ typedef struct usbi_cond_t_ usbi_cond_t;
#if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED))
#define HAVE_STRUCT_TIMESPEC 1
#define _TIMESPEC_DEFINED 1
+#if _MSC_VER < 1900
+// VS 2015 and above include <time.h> in stdlib.h
struct timespec {
long tv_sec;
long tv_nsec;
};
+#endif
#endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */
// We *were* getting ETIMEDOUT from pthread.h:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698