瀏覽代碼

Fixed struct timeval undeclared on Windows

Paul-Louis Ageneau 4 年之前
父節點
當前提交
c929be592b
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      examples/streamer/helpers.cpp

+ 2 - 1
examples/streamer/helpers.cpp

@@ -21,7 +21,8 @@
 
 
 #ifdef _WIN32
 #ifdef _WIN32
 // taken from https://stackoverflow.com/questions/10905892/equivalent-of-gettimeday-for-windows
 // taken from https://stackoverflow.com/questions/10905892/equivalent-of-gettimeday-for-windows
-#include <Windows.h>
+#include <windows.h>
+#include <winsock2.h> // for struct timeval
 
 
 struct timezone {
 struct timezone {
     int tz_minuteswest;
     int tz_minuteswest;