diff --git a/libavcodec/dxva2.h b/libavcodec/dxva2.h
index c06f1f333271e6f9ceb39611e46f2093fce7df8e..d161eb9f5ea76b60dd83607263366b872449e384 100644
--- a/libavcodec/dxva2.h
+++ b/libavcodec/dxva2.h
@@ -29,8 +29,8 @@
  * Public libavcodec DXVA2 header.
  */
 
+#define _WIN32_WINNT 0x0600
 #include <stdint.h>
-
 #include <d3d9.h>
 #include <dxva2api.h>