Skip to content

Commit

Permalink
dev-db/sqlcipher: fix building with libressl
Browse files Browse the repository at this point in the history
Reported-by: Toralf Förster <[email protected]>
Gentoo-Bug: 622114

Package-Manager: Portage-2.3.5, Repoman-2.3.1
  • Loading branch information
Pinkbyte committed Jul 6, 2017
1 parent a42f99f commit e26a572
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dev-db/sqlcipher/files/sqlcipher-3.4.1-libressl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/src/crypto_openssl.c 2017-07-06 08:11:21.560000000 +0300
+++ b/src/crypto_openssl.c 2017-07-06 08:11:32.180000000 +0300
@@ -46,7 +46,7 @@
static unsigned int openssl_init_count = 0;
static sqlite3_mutex* openssl_rand_mutex = NULL;

-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
static HMAC_CTX *HMAC_CTX_new(void)
{
HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx));
3 changes: 3 additions & 0 deletions dev-db/sqlcipher/sqlcipher-3.4.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ DOCS=( README.md )
src_prepare() {
append-cflags -DSQLITE_HAS_CODEC

# bug #622114
epatch "${FILESDIR}/${P}-libressl.patch"

eapply_user
eautoreconf
}
Expand Down

0 comments on commit e26a572

Please sign in to comment.