diff --git a/Makefile.common b/Makefile.common index 4665123b34..91054f6a17 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1210,7 +1210,7 @@ ifeq ($(HAVE_NETWORKING), 1) ifeq ($(HAVE_MINIUPNPC), 1) ifeq ($(HAVE_BUILTINMINIUPNPC), 1) DEFINES += -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR - DEFINES += -I$(DEPS_DIR)/miniupnpc + DEFINES += -I$(DEPS_DIR) OBJ += \ $(DEPS_DIR)/miniupnpc/igd_desc_parse.o \ $(DEPS_DIR)/miniupnpc/upnpreplyparse.o \ diff --git a/deps/miniupnpc/connecthostport.c b/deps/miniupnpc/connecthostport.c index e3c17d36be..8f4d1b5207 100644 --- a/deps/miniupnpc/connecthostport.c +++ b/deps/miniupnpc/connecthostport.c @@ -197,13 +197,13 @@ int connecthostport(const char * host, unsigned short port, /* setting a 3 seconds timeout for the connect() call */ timeout.tv_sec = 3; timeout.tv_usec = 0; - if(setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(struct timeval)) < 0) + if(setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (const char *)&timeout, sizeof(struct timeval)) < 0) { PRINT_SOCKET_ERROR("setsockopt"); } timeout.tv_sec = 3; timeout.tv_usec = 0; - if(setsockopt(s, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(struct timeval)) < 0) + if(setsockopt(s, SOL_SOCKET, SO_SNDTIMEO, (const char *)&timeout, sizeof(struct timeval)) < 0) { PRINT_SOCKET_ERROR("setsockopt"); }