summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-07-20 22:50:45 +0200
committerAndreas Schneider <mail@cynapses.org>2009-07-20 22:50:45 +0200
commit8843d8b68d180dbc3b0edbfb47ded3fadbe86988 (patch)
tree6b6f777e61858609d0f17011322011630b123af5
parent2aec79ce36999649886c23bbefa58dfa62529fc5 (diff)
downloadlibssh-8843d8b68d180dbc3b0edbfb47ded3fadbe86988.tar.gz
libssh-8843d8b68d180dbc3b0edbfb47ded3fadbe86988.tar.xz
libssh-8843d8b68d180dbc3b0edbfb47ded3fadbe86988.zip
Fix sol8 + ss11 compile errors.
Thanks to tysonite@gmail.com.
-rw-r--r--include/libssh/priv.h12
-rw-r--r--sample.c4
2 files changed, 14 insertions, 2 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 356d0f9..6fe8fba 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -175,7 +175,11 @@ void hmac_final(HMACCTX ctx,unsigned char *hashmacbuf,unsigned int *len);
struct string_struct {
u32 size;
unsigned char string[MAX_PACKET_LEN];
-} __attribute__ ((packed));
+}
+#if !defined(__SUNPRO_C)
+__attribute__ ((packed))
+#endif
+;
/** Describes a buffer state at a moment
*/
@@ -804,6 +808,12 @@ int ssh_execute_message_callbacks(SSH_SESSION *session);
/* log.c */
+#ifndef __FUNCTION__
+#if defined(__SUNPRO_C)
+#define __FUNCTION__ __func__
+#endif
+#endif
+
#define _enter_function(sess) \
do {\
if((sess)->log_verbosity >= SSH_LOG_FUNCTIONS){ \
diff --git a/sample.c b/sample.c
index a2b25fc..3847f04 100644
--- a/sample.c
+++ b/sample.c
@@ -555,8 +555,10 @@ int main(int argc, char **argv){
else
batch_shell(session);
}
+#ifdef WITH_SFTP
else
- do_sftp(session);
+ do_sftp(session);
+#endif
if(!sftp && !cmds[0])
do_cleanup(0);
ssh_disconnect(session);