From e7d28760f1fb7edb2c55b127292ffaab9a9e7257 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 20 Apr 2019 13:25:48 -0700 Subject: [PATCH] jose: Fix compilation without deprecated OpenSSL APIs Signed-off-by: Rosen Penev --- libs/jose/Makefile | 2 +- ...010-fix_minor_leak_upstream_198f720.patch} | 0 .../jose/patches/020-openssl-deprecated.patch | 21 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) rename libs/jose/patches/{Fix_minor_leak_upstream_198f720.patch => 010-fix_minor_leak_upstream_198f720.patch} (100%) create mode 100644 libs/jose/patches/020-openssl-deprecated.patch diff --git a/libs/jose/Makefile b/libs/jose/Makefile index f515cf85b..20b9c2f7e 100644 --- a/libs/jose/Makefile +++ b/libs/jose/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=jose PKG_VERSION:=10 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/ diff --git a/libs/jose/patches/Fix_minor_leak_upstream_198f720.patch b/libs/jose/patches/010-fix_minor_leak_upstream_198f720.patch similarity index 100% rename from libs/jose/patches/Fix_minor_leak_upstream_198f720.patch rename to libs/jose/patches/010-fix_minor_leak_upstream_198f720.patch diff --git a/libs/jose/patches/020-openssl-deprecated.patch b/libs/jose/patches/020-openssl-deprecated.patch new file mode 100644 index 000000000..bcee0dfad --- /dev/null +++ b/libs/jose/patches/020-openssl-deprecated.patch @@ -0,0 +1,21 @@ +--- a/lib/openssl/compat.h ++++ b/lib/openssl/compat.h +@@ -17,6 +17,7 @@ + + #pragma once + ++#include + #include + #include + #include +--- a/lib/openssl/misc.c ++++ b/lib/openssl/misc.c +@@ -185,6 +185,8 @@ add_entity(json_t *root, json_t *obj, const char *plural, ...) + static void __attribute__((constructor)) + constructor(void) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + OpenSSL_add_all_algorithms(); ++#endif + RAND_poll(); + }