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

Steve Lhomme robux4 at videolabs.io
Sat Jan 30 09:26:25 CET 2016


From: Steve Lhomme <robUx4 at gmail.com>

---
 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 10782bc..00fbe2d 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 a37cdf1..5f11b77 100644
--- a/src/video_output/snapshot.c
+++ b/src/video_output/snapshot.c
@@ -29,6 +29,9 @@
 #include <assert.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
 #include <dirent.h>
 #include <time.h>
 
-- 
2.6.0.windows.1



More information about the vlc-devel mailing list