]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix SOCKET_OK test on win64.
authorNick Mathewson <nickm@torproject.org>
Wed, 18 Jan 2012 15:47:22 +0000 (10:47 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 18 Jan 2012 15:48:29 +0000 (10:48 -0500)
Bugfix on 0.2.2.29-beta; partial fix for 4533; found by wanoskarnet

changes/bug4533_part2 [new file with mode: 0644]
src/common/compat.h

diff --git a/changes/bug4533_part2 b/changes/bug4533_part2
new file mode 100644 (file)
index 0000000..7e0f7c3
--- /dev/null
@@ -0,0 +1,5 @@
+  o Major bugfixes:
+    - Fix the SOCKET_OK test that we use to tell when socket
+      creation fails so that it works on Win64. Fixes part of bug
+      4533; bugfix on 0.2.2.29-beta. Bug found by wanoskarnet.
+
index e0b074cf5315295de7907100c6e3051d6567fc16..d2f1fd12959a5ba267b14a768ef3cc5b57c62dd4 100644 (file)
@@ -396,7 +396,7 @@ typedef int socklen_t;
 
 #ifdef MS_WINDOWS
 #define tor_socket_t intptr_t
-#define SOCKET_OK(s) ((unsigned)(s) != INVALID_SOCKET)
+#define SOCKET_OK(s) ((SOCKET)(s) != INVALID_SOCKET)
 #else
 #define tor_socket_t int
 #define SOCKET_OK(s) ((s) >= 0)