summaryrefslogtreecommitdiff
path: root/osdep
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2015-07-28 16:50:18 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2015-07-28 16:50:18 -0700
commit14264c2d6f7d20b15081a1db5e8ca4b978d935a0 (patch)
treed9635c28bb7cda8aeb0a956db4ed3c3c09598437 /osdep
parent3c54187c4019f29ed35a42ad3af06c38e16236ac (diff)
downloadinfinitytier-14264c2d6f7d20b15081a1db5e8ca4b978d935a0.tar.gz
infinitytier-14264c2d6f7d20b15081a1db5e8ca4b978d935a0.zip
Add miniupnpc builds for Windows, fix some Windows build warnings.
Diffstat (limited to 'osdep')
-rw-r--r--osdep/Phy.hpp2
-rw-r--r--osdep/UPNPClient.cpp10
2 files changed, 9 insertions, 3 deletions
diff --git a/osdep/Phy.hpp b/osdep/Phy.hpp
index 5afd715b..2ea68b9d 100644
--- a/osdep/Phy.hpp
+++ b/osdep/Phy.hpp
@@ -781,7 +781,7 @@ public:
// Causes entry to be deleted from list in poll(), ignored elsewhere
sws.type = ZT_PHY_SOCKET_CLOSED;
- if (sws.sock >= _nfds) {
+ if ((long)sws.sock >= (long)_nfds) {
long nfds = (long)_whackSendSocket;
if ((long)_whackReceiveSocket > nfds)
nfds = (long)_whackReceiveSocket;
diff --git a/osdep/UPNPClient.cpp b/osdep/UPNPClient.cpp
index 20aa9d39..ceecb3a3 100644
--- a/osdep/UPNPClient.cpp
+++ b/osdep/UPNPClient.cpp
@@ -40,8 +40,14 @@
#include "../node/Utils.hpp"
#include "UPNPClient.hpp"
-#include <miniupnpc/miniupnpc.h>
-#include <miniupnpc/upnpcommands.h>
+#ifdef __WINDOWS__
+#ifndef MINIUPNP_STATICLIB
+#define MINIUPNP_STATICLIB
+#endif
+#endif
+
+#include "../ext/bin/miniupnpc/include/miniupnpc/miniupnpc.h"
+#include "../ext/bin/miniupnpc/include/miniupnpc/upnpcommands.h"
namespace ZeroTier {