packages/libs/jose/patches/020-openssl-deprecated.patch
Ilya Lipnitskiy 5d8d4fbbcb
treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00

21 lines
476 B
Diff

--- a/lib/openssl/compat.h
+++ b/lib/openssl/compat.h
@@ -17,6 +17,7 @@
#pragma once
+#include <openssl/bn.h>
#include <openssl/hmac.h>
#include <openssl/ec.h>
#include <openssl/ecdsa.h>
--- a/lib/openssl/misc.c
+++ b/lib/openssl/misc.c
@@ -185,6 +185,8 @@ add_entity(json_t *root, json_t *obj, co
static void __attribute__((constructor))
constructor(void)
{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
OpenSSL_add_all_algorithms();
+#endif
RAND_poll();
}