compile fixes for older openssl versions

closes #711

Change-Id: I04925a0cf105bf70d63dd7b1ed3297aceecac5a5
changes/32/25932/7
Richard Fuchs 7 years ago
parent 6c3a6b58f5
commit 4bb1381cfb

@ -5,6 +5,7 @@
#include <assert.h>
#include "compat.h"
#include <openssl/rand.h>
#include <pthread.h>
#define THREAD_BUF_SIZE 64

@ -1,6 +1,7 @@
#include "ssllib.h"
#include <openssl/ssl.h>
#include <time.h>
#include "auxlib.h"
#if OPENSSL_VERSION_NUMBER < 0x10100000L

@ -1,7 +1,7 @@
TARGET= rtpengine-recording
CFLAGS= -g -Wall -pthread -I. -I../lib/ -I../kernel-module/
CFLAGS+= -std=c99
CFLAGS+= -std=c99 -fno-strict-aliasing
CFLAGS+= -D_GNU_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE
CFLAGS+= $(shell pkg-config --cflags glib-2.0)
CFLAGS+= $(shell pkg-config --cflags gthread-2.0)

@ -186,7 +186,11 @@ out:
// initialise the connection
ZERO(ret->tls_fwd_poller);
dbg("Starting TLS connection to %s", endpoint_print_buf(&tls_send_to_ep));
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
ret->ssl_ctx = SSL_CTX_new(TLS_client_method());
#else
ret->ssl_ctx = SSL_CTX_new(SSLv23_client_method());
#endif
if (!ret->ssl_ctx) {
ilog(LOG_ERR, "Failed to create TLS context");
ssrc_tls_shutdown(ret);

Loading…
Cancel
Save