From 757bab823c5b37d1a4dd344a59c10d3a1ceb3885 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Wed, 23 Mar 2016 12:04:02 -0500 Subject: [PATCH] misc solaris fixes --- librb/src/openssl.c | 7 ++++--- librb/src/ports.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/librb/src/openssl.c b/librb/src/openssl.c index 9898bf80..eea76c6f 100644 --- a/librb/src/openssl.c +++ b/librb/src/openssl.c @@ -359,9 +359,10 @@ rb_init_ssl(void) SSL_CTX_set_session_cache_mode(ssl_server_ctx, SSL_SESS_CACHE_OFF); SSL_CTX_set_cipher_list(ssl_server_ctx, librb_ciphers); - /* Set ECDHE on OpenSSL 1.00+, but make sure it's actually available because redhat are dicks - and bastardise their OpenSSL for stupid reasons... */ - #if (OPENSSL_VERSION_NUMBER >= 0x10000000L) && defined(NID_secp384r1) + /* Set ECDHE on OpenSSL 1.00+, but make sure it's actually available + * (it's not by default on Solaris or Red Hat... fuck Red Hat and Oracle) + */ + #if (OPENSSL_VERSION_NUMBER >= 0x10000000L) && !defined(OPENSSL_NO_ECDH) EC_KEY *key = EC_KEY_new_by_curve_name(NID_secp384r1); if (key) { SSL_CTX_set_tmp_ecdh(ssl_server_ctx, key); diff --git a/librb/src/ports.c b/librb/src/ports.c index af025718..bc2d85b6 100644 --- a/librb/src/ports.c +++ b/librb/src/ports.c @@ -123,7 +123,7 @@ rb_setselect_ports(rb_fde_t *F, unsigned int type, PF * handler, void *client_da int rb_select_ports(long delay) { - int i, fd; + int i; unsigned int nget = 1; struct timespec poll_time; struct timespec *p = NULL;