summaryrefslogtreecommitdiffstats
path: root/include/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-12-01 16:15:54 +0100
committerAndreas Schneider <mail@cynapses.org>2009-12-02 00:23:00 +0100
commite5bf645010f74408060ced7d0c327a5f65823d1b (patch)
tree686a8752ae1c11490cd16853eb290a48653ad4e1 /include/libssh
parentd1c6fa9261963dbaf54a85f99ba9c09bfc8029bf (diff)
Fixed uint* to work on Windows.
Thanks to Patrick Spendrin.
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/libssh.h4
-rw-r--r--include/libssh/pcap.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index a17e90a2..b8462209 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -50,6 +50,7 @@
#ifdef _MSC_VER
/* Visual Studio hasn't inttypes.h so it doesn't know uint32_t */
+ typedef int int32_t;
typedef unsigned int uint32_t;
typedef unsigned short uint16_t;
typedef unsigned char uint8_t;
@@ -62,6 +63,9 @@
#ifdef _WIN32
#include <winsock2.h>
+ #ifndef socklen_t
+ #define socklen_t int
+ #endif
#else /* _WIN32 */
#include <sys/select.h> /* for fd_set * */
#include <netdb.h>
diff --git a/include/libssh/pcap.h b/include/libssh/pcap.h
index 831a5647..2026f470 100644
--- a/include/libssh/pcap.h
+++ b/include/libssh/pcap.h
@@ -7,7 +7,7 @@
#ifdef WITH_PCAP
typedef struct ssh_pcap_context_struct* ssh_pcap_context;
-int ssh_pcap_file_write_packet(ssh_pcap_file pcap, ssh_buffer packet, u_int32_t original_len);
+int ssh_pcap_file_write_packet(ssh_pcap_file pcap, ssh_buffer packet, uint32_t original_len);
ssh_pcap_context ssh_pcap_context_new(ssh_session session);
void ssh_pcap_context_free(ssh_pcap_context ctx);
@@ -18,7 +18,7 @@ enum ssh_pcap_direction{
};
void ssh_pcap_context_set_file(ssh_pcap_context, ssh_pcap_file);
int ssh_pcap_context_write(ssh_pcap_context,enum ssh_pcap_direction direction, void *data,
- u_int32_t len, u_int32_t origlen);
+ uint32_t len, uint32_t origlen);
#endif /* WITH_PCAP */