git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
d8f8800
)
Merge branch 'master' of github.com:novacoin-project/novacoin
author
CryptoManiac
<balthazar@yandex.ru>
Sun, 7 Dec 2014 02:11:59 +0000 (06:11 +0400)
committer
CryptoManiac
<balthazar@yandex.ru>
Sun, 7 Dec 2014 02:11:59 +0000 (06:11 +0400)
src/stun.cpp
patch
|
blob
|
history
diff --git
a/src/stun.cpp
b/src/stun.cpp
index
f724eaa
..
4bf2c94
100644
(file)
--- a/
src/stun.cpp
+++ b/
src/stun.cpp
@@
-41,10
+41,8
@@
#include <arpa/inet.h>
#include <netdb.h>
#endif
-#ifndef _MSC_VER
+#ifndef WIN32
#include <unistd.h>
-#else
-#include <io.h>
#endif
#include <time.h>
#include <errno.h>
@@
-509,10
+507,10
@@
static int StunRequest(const char *host, uint16_t port, struct sockaddr_in *mapp
int rc = -3;
if(bind(sock, (struct sockaddr*)&client, sizeof(client)) >= 0)
rc = StunRequest2(sock, &server, mapped);
-#ifndef _MSC_VER
+#ifndef WIN32
close(sock);
#else
- _close(sock);
+ closesocket(sock);
#endif
return rc;
} // StunRequest