summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.h2
-rw-r--r--src/tools/tor-fw-helper/tor-fw-helper-natpmp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 1b79565c0b..4329d45369 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -403,7 +403,7 @@ typedef int socklen_t;
* any inadvertant checks for the socket being <= 0 or > 0 will probably
* still work. */
#define tor_socket_t intptr_t
-#define SOCKET_OK(s) ((unsigned)(s) != INVALID_SOCKET)
+#define SOCKET_OK(s) ((SOCKET)(s) != INVALID_SOCKET)
#define TOR_INVALID_SOCKET INVALID_SOCKET
#else
/** Type used for a network socket. */
diff --git a/src/tools/tor-fw-helper/tor-fw-helper-natpmp.c b/src/tools/tor-fw-helper/tor-fw-helper-natpmp.c
index 2380b141df..a3a52d1037 100644
--- a/src/tools/tor-fw-helper/tor-fw-helper-natpmp.c
+++ b/src/tools/tor-fw-helper/tor-fw-helper-natpmp.c
@@ -87,7 +87,7 @@ tor_natpmp_cleanup(tor_fw_options_t *tor_fw_options, void *backend_state)
/** Use select() to wait until we can read on fd. */
static int
-wait_until_fd_readable(unsigned int fd, struct timeval *timeout)
+wait_until_fd_readable(tor_socket_t fd, struct timeval *timeout)
{
int r;
fd_set fds;