--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -41,6 +41,11 @@
 #include <algorithm>
 #include <set>
 #include <string>
+
+#ifdef _WIN32
+#include <iptypes.h>
+#include <iphlpapi.h>
+#endif
 
 #if UPNP_VERSION < 10623
 /*
