fix compile errors on linux
authorFelix Fietkau <nbd@openwrt.org>
Fri, 4 Jan 2013 22:17:35 +0000 (23:17 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 13 Jan 2013 08:41:32 +0000 (09:41 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
ustream-example.c
ustream-ssl.c

index b3cbe763df5c579ff325a0ae79f27f5b0fb836f7..ea22067be3ff020d036709f35b67da4e20333e9e 100644 (file)
@@ -5,6 +5,7 @@
 #include <getopt.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <libubox/ustream.h>
 #include <libubox/uloop.h>
index ce32eb5761dfaf9ff1c4ca08e1ab32f3c9c20e2f..afb01f35f1d6b9a3cc16d9c85ca1568c67748a87 100644 (file)
@@ -182,12 +182,8 @@ static void ustream_ssl_stream_init(struct ustream_ssl *us)
 
 static void *_ustream_ssl_context_new(bool server)
 {
-#ifdef CYASSL_OPENSSL_H_
-       SSL_METHOD *m;
-#else
-       const SSL_METHOD *m;
-#endif
        SSL_CTX *c;
+       const void *m;
 
        ssl_init();
 
@@ -203,7 +199,7 @@ static void *_ustream_ssl_context_new(bool server)
                m = TLSv1_client_method();
 #endif
 
-       c = SSL_CTX_new(m);
+       c = SSL_CTX_new((void *) m);
        if (!c)
                return NULL;