summaryrefslogtreecommitdiffstats
path: root/include/libssh/priv.h
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-07-30 10:45:58 +0200
committerAndreas Schneider <mail@cynapses.org>2009-07-30 10:45:58 +0200
commit766bae9d7626bb596fc3b60d2cd5fe5a7fc356db (patch)
treeec6aa6d9ea44d8eea5c47a8d1245c4fbe2930d96 /include/libssh/priv.h
parent94a57df0c9eceda18679b2823de74837fb5a73c1 (diff)
downloadlibssh-766bae9d7626bb596fc3b60d2cd5fe5a7fc356db.tar.gz
libssh-766bae9d7626bb596fc3b60d2cd5fe5a7fc356db.tar.xz
libssh-766bae9d7626bb596fc3b60d2cd5fe5a7fc356db.zip
Fix build with MSVC.
Diffstat (limited to 'include/libssh/priv.h')
-rw-r--r--include/libssh/priv.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index ead6cfc..ffdf8fd 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -29,6 +29,13 @@
#ifndef _LIBSSH_PRIV_H
#define _LIBSSH_PRIV_H
+
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#else
+#include <unistd.h>
+#endif
+
#include "config.h"
#include "libssh/libssh.h"
@@ -172,13 +179,19 @@ void hmac_final(HMACCTX ctx,unsigned char *hashmacbuf,unsigned int *len);
/* strings and buffers */
/* must be 32 bits number + immediatly our data */
+#ifdef _MSC_VER
+#pragma pack(1)
+#endif
struct ssh_string_struct {
uint32_t size;
unsigned char string[MAX_PACKET_LEN];
}
-#if !defined(__SUNPRO_C)
+#if !defined(__SUNPRO_C) && !defined(_MSC_VER)
__attribute__ ((packed))
#endif
+#ifdef _MSC_VER
+#pragma pack()
+#endif
;
/** Describes a buffer state at a moment