This was taken from Archlinux: https://gitlab.archlinux.org/archlinux/packaging/packages/rtmpdump/-/blob/main/nettle-4.patch
Signed-off-by: Markus Volk <[email protected]> --- .../rtmpdump/rtmpdump/nettle-4.patch | 78 +++++++++++++++++++ .../rtmpdump/rtmpdump_2.6.bb | 1 + 2 files changed, 79 insertions(+) create mode 100644 meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump/nettle-4.patch diff --git a/meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump/nettle-4.patch b/meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump/nettle-4.patch new file mode 100644 index 0000000000..8850b35d5c --- /dev/null +++ b/meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump/nettle-4.patch @@ -0,0 +1,78 @@ +This patch was taken from Archlinux + +Upstream-Status: Inappropriate [https://gitlab.archlinux.org/archlinux/packaging/packages/rtmpdump/-/blob/main/nettle-4.patch] + +Signed-off-by: Markus Volk <[email protected]> + +diff --git a/librtmp/handshake.h b/librtmp/handshake.h +index ac38c88..53301c7 100644 +--- a/librtmp/handshake.h ++++ b/librtmp/handshake.h +@@ -45,6 +45,7 @@ typedef arc4_context * RC4_handle; + #elif defined(USE_GNUTLS) + #include <nettle/hmac.h> + #include <nettle/arcfour.h> ++#include <nettle/version.h> + #ifndef SHA256_DIGEST_LENGTH + #define SHA256_DIGEST_LENGTH 32 + #endif +@@ -52,7 +53,11 @@ typedef arc4_context * RC4_handle; + #define HMAC_CTX struct hmac_sha256_ctx + #define HMAC_setup(ctx, key, len) hmac_sha256_set_key(&ctx, len, key) + #define HMAC_crunch(ctx, buf, len) hmac_sha256_update(&ctx, len, buf) ++#if NETTLE_VERSION_MAJOR > 3 ++#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(&ctx, dig) ++#else + #define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(&ctx, SHA256_DIGEST_LENGTH, dig) ++#endif + #define HMAC_close(ctx) + + typedef struct arcfour_ctx* RC4_handle; +diff --git a/librtmp/hashswf.c b/librtmp/hashswf.c +index fc5f824..3ab1d3f 100644 +--- a/librtmp/hashswf.c ++++ b/librtmp/hashswf.c +@@ -44,6 +44,7 @@ + #define HMAC_close(ctx) + #elif defined(USE_GNUTLS) + #include <nettle/hmac.h> ++#include <nettle/version.h> + #ifndef SHA256_DIGEST_LENGTH + #define SHA256_DIGEST_LENGTH 32 + #endif +@@ -51,7 +52,11 @@ + #define HMAC_CTX struct hmac_sha256_ctx + #define HMAC_setup(ctx, key, len) hmac_sha256_set_key(&ctx, len, key) + #define HMAC_crunch(ctx, buf, len) hmac_sha256_update(&ctx, len, buf) ++#if NETTLE_VERSION_MAJOR > 3 ++#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(&ctx, dig) ++#else + #define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(&ctx, SHA256_DIGEST_LENGTH, dig) ++#endif + #define HMAC_close(ctx) + #else /* USE_OPENSSL */ + #include <openssl/ssl.h> +diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c +index cf1de70..a53ed9f 100644 +--- a/librtmp/rtmp.c ++++ b/librtmp/rtmp.c +@@ -57,6 +57,7 @@ static const char *my_dhm_G = "4"; + #define MD5_DIGEST_LENGTH 16 + #include <nettle/base64.h> + #include <nettle/md5.h> ++#include <nettle/version.h> + #else /* USE_OPENSSL */ + #include <openssl/ssl.h> + #include <openssl/rc4.h> +@@ -2492,7 +2493,11 @@ b64enc(const unsigned char *input, int length, char *output, int maxsize) + typedef struct md5_ctx MD5_CTX; + #define MD5_Init(ctx) md5_init(ctx) + #define MD5_Update(ctx,data,len) md5_update(ctx,len,data) ++#if NETTLE_VERSION_MAJOR > 3 ++#define MD5_Final(dig,ctx) md5_digest(ctx,dig) ++#else + #define MD5_Final(dig,ctx) md5_digest(ctx,MD5_DIGEST_LENGTH,dig) ++#endif + #else + #endif + diff --git a/meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.6.bb b/meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.6.bb index c02b45054f..d6c5886b95 100644 --- a/meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.6.bb +++ b/meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.6.bb @@ -11,6 +11,7 @@ PV .= "+git" SRCREV = "6f6bb1353fc84f4cc37138baa99f586750028a01" SRC_URI = " \ git://git.ffmpeg.org/rtmpdump;branch=master \ + file://nettle-4.patch \ " -- 2.54.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#127714): https://lists.openembedded.org/g/openembedded-devel/message/127714 Mute This Topic: https://lists.openembedded.org/mt/119956630/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
