diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h
index 73692ef..adc2917 100644
--- a/src/libssh2_priv.h
+++ b/src/libssh2_priv.h
@@ -99,7 +99,7 @@
 /* same as WSABUF */
 struct iovec {
     u_long iov_len;
-    char *iov_base;
+    void *iov_base;
 };
 
 #define inline __inline
@@ -724,7 +724,7 @@ struct _LIBSSH2_SESSION
     LIBSSH2_LISTENER *listeners;
 
     /* Actual I/O socket */
-    int socket_fd;
+    unsigned int socket_fd;
     int socket_state;
     int socket_block_directions;
     int socket_prev_blockstate; /* stores the state of the socket blockiness
diff --git a/src/session.c b/src/session.c
index 92109b4..4e3fcea 100644
--- a/src/session.c
+++ b/src/session.c
@@ -241,6 +241,8 @@ static int
 session_nonblock(int sockfd,   /* operate on this */
                  int nonblock /* TRUE or FALSE */ )
 {
+sockfd=sockfd;
+nonblock=nonblock;
 #undef SETBLOCK
 #define SETBLOCK 0
 #ifdef HAVE_O_NONBLOCK
