aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 51e89c6b..958b0d04 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -174,7 +174,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
*/
@@ -719,6 +723,12 @@ int match_hostname(const char *host, const char *pattern, unsigned int len);
/* 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 599163fb..74e09974 100644
--- a/sample.c
+++ b/sample.c
@@ -556,8 +556,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);