diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-07-30 10:45:58 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-07-30 10:45:58 +0200 |
commit | 766bae9d7626bb596fc3b60d2cd5fe5a7fc356db (patch) | |
tree | ec6aa6d9ea44d8eea5c47a8d1245c4fbe2930d96 /libssh/socket.c | |
parent | 94a57df0c9eceda18679b2823de74837fb5a73c1 (diff) | |
download | libssh-766bae9d7626bb596fc3b60d2cd5fe5a7fc356db.tar.gz libssh-766bae9d7626bb596fc3b60d2cd5fe5a7fc356db.tar.xz libssh-766bae9d7626bb596fc3b60d2cd5fe5a7fc356db.zip |
Fix build with MSVC.
Diffstat (limited to 'libssh/socket.c')
-rw-r--r-- | libssh/socket.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libssh/socket.c b/libssh/socket.c index 5d5f27f..8b4c905 100644 --- a/libssh/socket.c +++ b/libssh/socket.c @@ -21,7 +21,6 @@ * MA 02111-1307, USA. */ -#include <unistd.h> #include <errno.h> #include <string.h> #include <stdlib.h> @@ -264,7 +263,7 @@ int ssh_socket_completeread(struct socket *s, void *buffer, uint32_t len) { return SSH_ERROR; } - while((r = ssh_socket_unbuffered_read(s, buffer + total, toread))) { + while((r = ssh_socket_unbuffered_read(s, ((uint8_t*)buffer + total), toread))) { if (r < 0) { return SSH_ERROR; } @@ -303,7 +302,7 @@ int ssh_socket_completewrite(struct socket *s, const void *buffer, uint32_t len) return SSH_ERROR; } len -= written; - buffer += written; + buffer = ((uint8_t*)buffer + written); } leave_function(); |