From daae10fbfe16bac26f74af91faf253d377f1b166 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 7 Aug 2010 17:33:02 +0100 Subject: OpenSolaris (non-gcc) fixes, patches from Dagobert Michelsen with some changes. --- lib/Makefile | 1 - lib/md5.h | 4 ++++ lib/oauth.c | 2 +- lib/sha1.h | 4 ++++ lib/xmltree.c | 5 ++++- 5 files changed, 13 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/Makefile b/lib/Makefile index 8fd9b19e..bebe3ba6 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -14,7 +14,6 @@ endif # [SH] Program variables objects = arc.o base64.o $(EVENT_HANDLER) ftutil.o http_client.o ini.o md5.o misc.o oauth.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o -CFLAGS += -Wall LFLAGS += -r # [SH] Phony targets diff --git a/lib/md5.h b/lib/md5.h index 094507b2..3ba28586 100644 --- a/lib/md5.h +++ b/lib/md5.h @@ -26,7 +26,11 @@ #include #include +#if(__sun) +#include +#else #include +#endif typedef uint8_t md5_byte_t; typedef struct MD5Context { diff --git a/lib/oauth.c b/lib/oauth.c index c60a5a52..57dd10f8 100644 --- a/lib/oauth.c +++ b/lib/oauth.c @@ -59,7 +59,7 @@ static char *oauth_sign( const char *method, const char *url, else { g_snprintf( (gchar*) key, HMAC_BLOCK_SIZE + 1, "%s&%s", - oi->sp->consumer_secret, oi->token_secret ? : "" ); + oi->sp->consumer_secret, oi->token_secret ? oi->token_secret : "" ); } /* Inner part: H(K XOR 0x36, text) */ diff --git a/lib/sha1.h b/lib/sha1.h index 368c0669..4ef8ac92 100644 --- a/lib/sha1.h +++ b/lib/sha1.h @@ -23,7 +23,11 @@ #ifndef _SHA1_H_ #define _SHA1_H_ +#if(__sun) +#include +#else #include +#endif #include #ifndef _SHA_enum_ diff --git a/lib/xmltree.c b/lib/xmltree.c index 31f8ee9c..b0a945ce 100644 --- a/lib/xmltree.c +++ b/lib/xmltree.c @@ -214,7 +214,10 @@ void xt_cleanup( struct xt_parser *xt, struct xt_node *node, int depth ) return; if( node == NULL ) - return xt_cleanup( xt, xt->root, depth ); + { + xt_cleanup( xt, xt->root, depth ); + return; + } if( node->flags & XT_SEEN && node == xt->root ) { -- cgit v1.2.3