[vlc-devel] [PATCH] timeval is officially defined in winsock2.h on Windows

Steve Lhomme robux4 at gmail.com
Thu Aug 6 12:14:28 CEST 2015


see https://msdn.microsoft.com/en-us/library/windows/desktop/ms740560%28v=vs.85%29.aspx
---
 src/misc/mtime.c            | 3 +++
 src/video_output/snapshot.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/misc/mtime.c b/src/misc/mtime.c
index 46939dc..fdb71b4 100644
--- a/src/misc/mtime.c
+++ b/src/misc/mtime.c
@@ -44,6 +44,9 @@
 # include <time.h> /* clock_gettime() */
 #else
 # include <sys/time.h>
+# ifdef _WIN32
+#  include <winsock2.h>
+# endif
 #endif
 
 /**
diff --git a/src/video_output/snapshot.c b/src/video_output/snapshot.c
index 7c8b527..2a44b30 100644
--- a/src/video_output/snapshot.c
+++ b/src/video_output/snapshot.c
@@ -30,6 +30,9 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/time.h>
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
 #include <dirent.h>
 #include <time.h>
 
-- 
2.5.0



More information about the vlc-devel mailing list