From acde0771209015edeeea8992a0e8a5d5abd6a82e Mon Sep 17 00:00:00 2001 From: pancake Date: Sat, 2 Nov 2024 10:42:04 +0100 Subject: [PATCH] Partial fix for the openssl builds --- libr/config.mk.tail | 2 -- libr/crypto/hash/deps.mk | 5 +++-- libr/include/r_hash.h | 7 ++++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libr/config.mk.tail b/libr/config.mk.tail index 17b353b012..b83315f00e 100644 --- a/libr/config.mk.tail +++ b/libr/config.mk.tail @@ -49,11 +49,9 @@ BN_LIBS=${SSL_LDFLAGS} endif #both of these need ssl includes -ifneq (,$(filter r_socket r_util,$(BINDEPS))) ifeq (${HAVE_LIB_SSL},1) CFLAGS+=${SSL_CFLAGS} endif -endif # XXX do it in configure stage OSTYPE?=gnulinux diff --git a/libr/crypto/hash/deps.mk b/libr/crypto/hash/deps.mk index 7ff18a9e26..e5986b17d5 100644 --- a/libr/crypto/hash/deps.mk +++ b/libr/crypto/hash/deps.mk @@ -6,9 +6,10 @@ ifeq ($(WANT_SSL_CRYPTO),1) CFLAGS+=${SSL_CFLAGS} LDFLAGS+=${SSL_LDFLAGS} LINK+=${SSL_LDFLAGS} -else -OBJS+=hash/md4.o hash/md5.o hash/sha1.o hash/sha2.o +#else +# OBJS+=hash/md4.o hash/md5.o hash/sha1.o hash/sha2.o endif +OBJS+=hash/md4.o hash/md5.o hash/sha1.o hash/sha2.o ifeq ($(USE_LIB_XXHASH),1) LDFLAGS+=${LIB_XXHASH} diff --git a/libr/include/r_hash.h b/libr/include/r_hash.h index 96b1de500f..49909098d5 100644 --- a/libr/include/r_hash.h +++ b/libr/include/r_hash.h @@ -29,7 +29,9 @@ typedef struct r_hash_plugin_t { } RHashPlugin; #endif -#if WANT_SSL_CRYPTO +// WANT_SSL_CRYPTO +#if 0 +// XXX breaks the build because openssl code is not portable, just force those plugins to always be native #include #include typedef MD5_CTX RHashMD5Context; @@ -41,7 +43,7 @@ typedef SHA512_CTX RSha512Context; #define SHA384_BLOCK_LENGTH SHA384_CBLOCK #define SHA512_BLOCK_LENGTH SHA512_CBLOCK #else -#define MD5_CTX RHashMD5Context +// #define MD5_CTX RHashMD5Context /* hashing */ typedef struct { @@ -75,7 +77,6 @@ typedef struct _SHA512_CTX { typedef RSha512Context RSha384Context; #endif - /* * Since we have not enough space in bitmask, you may do fine * selection of required hash functions by the followed macros.