megatools: fix patch. thanks @ebfe

This commit is contained in:
Enno Boland 2017-09-27 14:17:42 +02:00
parent 95cd7164c0
commit c3a9545bdf
2 changed files with 32 additions and 3 deletions

View file

@ -1,5 +1,5 @@
--- lib/mega.c.orig 2017-09-27 13:56:24.880875673 +0200
+++ lib/mega.c 2017-09-27 13:56:28.285869611 +0200
--- lib/mega.c.orig 2017-09-27 14:15:26.356842896 +0200
+++ lib/mega.c 2017-09-27 14:15:45.495808811 +0200
@@ -803,7 +803,7 @@ static gboolean rsa_key_gen(rsa_key* k)
return FALSE;
}
@ -9,3 +9,32 @@
RSA_get0_key(key, &k->m, &k->e, &k->d);
RSA_get0_factors(key, &k->q, &k->p);
RSA_get0_crt_params(key, NULL, NULL, &k->u);
@@ -2988,7 +2988,7 @@ struct _put_data
GByteArray* buffer;
};
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
void AES_ctr128_encrypt(
const unsigned char *in,
unsigned char *out,
--- lib/tools.c.orig 2017-09-27 14:15:36.322825147 +0200
+++ lib/tools.c 2017-09-27 14:15:58.974784808 +0200
@@ -107,7 +107,7 @@ static GOptionEntry network_options[] =
{ NULL }
};
-#if OPENSSL_VERSION_NUMBER >= 0x10100004L
+#if OPENSSL_VERSION_NUMBER >= 0x10100004L && !defined(LIBRESSL_VERSION_NUMBER)
static void init_openssl_locking()
{
// OpenSSL >= 1.1.0-pre4 doesn't require specific callback setup
@@ -567,7 +567,7 @@ void tool_fini(mega_session* s)
CRYPTO_cleanup_all_ex_data();
ERR_free_strings();
-#if OPENSSL_VERSION_NUMBER < 0x10100004L
+#if OPENSSL_VERSION_NUMBER < 0x10100004L || defined(LIBRESSL_VERSION_NUMBER)
CRYPTO_set_id_callback(NULL);
CRYPTO_set_locking_callback(NULL);
#endif

View file

@ -1,7 +1,7 @@
# Template file for 'megatools'
pkgname=megatools
version=1.9.98
revision=1
revision=2
build_style=gnu-configure
hostmakedepends="pkg-config asciidoc"
makedepends="glib-networking gobject-introspection libressl-devel libcurl-devel fuse-devel libsodium-devel glib-devel"