aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2024-07-11 01:46:57 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2024-07-11 01:48:00 +0200
commit1fd7313bb6cc36d7aa1efe51a641500da0bfdd66 (patch)
treeff408b9c195dfcc579dc95de82065a45f64c684a /app-crypt
parentdev-embedded/bcm2-utils: Fix DEPEND and RDEPEND (diff)
downloadguru-1fd7313bb6cc36d7aa1efe51a641500da0bfdd66.tar.gz
guru-1fd7313bb6cc36d7aa1efe51a641500da0bfdd66.tar.bz2
guru-1fd7313bb6cc36d7aa1efe51a641500da0bfdd66.zip
app-crypt/reop: Modern-C fixes
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/reop/files/reop-2.1.1-base64-function-signatures.patch41
-rw-r--r--app-crypt/reop/files/reop-2.1.1-bcrypt_hash-cdata-sizeof.patch11
-rw-r--r--app-crypt/reop/reop-2.1.1-r1.ebuild (renamed from app-crypt/reop/reop-2.1.1.ebuild)7
3 files changed, 58 insertions, 1 deletions
diff --git a/app-crypt/reop/files/reop-2.1.1-base64-function-signatures.patch b/app-crypt/reop/files/reop-2.1.1-base64-function-signatures.patch
new file mode 100644
index 000000000..1641abd81
--- /dev/null
+++ b/app-crypt/reop/files/reop-2.1.1-base64-function-signatures.patch
@@ -0,0 +1,41 @@
+--- a/other/other.c
++++ b/other/other.c
+@@ -328,11 +328,7 @@ static const char Pad64 = '=';
+ */
+
+ int
+-b64_ntop(src, srclength, target, targsize)
+- u_char const *src;
+- size_t srclength;
+- char *target;
+- size_t targsize;
++b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)
+ {
+ size_t datalength = 0;
+ u_char input[3];
+@@ -392,10 +388,7 @@ b64_ntop(src, srclength, target, targsize)
+ */
+
+ int
+-b64_pton(src, target, targsize)
+- char const *src;
+- u_char *target;
+- size_t targsize;
++b64_pton(char const *src, u_char *target, size_t targsize)
+ {
+ int tarindex, state, ch;
+ u_char nextbyte;
+diff --git a/other/other.h b/other/other.h
+index 08701fa..9ff1c0d 100644
+--- a/other/other.h
++++ b/other/other.h
+@@ -3,6 +3,9 @@
+
+ #define _PATH_TTY "/dev/tty"
+
++int b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize);
++int b64_pton(char const *src, u_char *target, size_t targsize);
++
+ #ifndef HAVE_STRLCAT
+ size_t strlcat(char *dst, const char *src, size_t siz);
+ #endif
diff --git a/app-crypt/reop/files/reop-2.1.1-bcrypt_hash-cdata-sizeof.patch b/app-crypt/reop/files/reop-2.1.1-bcrypt_hash-cdata-sizeof.patch
new file mode 100644
index 000000000..d418740d3
--- /dev/null
+++ b/app-crypt/reop/files/reop-2.1.1-bcrypt_hash-cdata-sizeof.patch
@@ -0,0 +1,11 @@
+--- a/other/other.c
++++ b/other/other.c
+@@ -659,7 +659,7 @@ bcrypt_hash(u_int8_t *sha2pass, u_int8_t *sha2salt, u_int8_t *out)
+ cdata[i] = Blowfish_stream2word(ciphertext, sizeof(ciphertext),
+ &j);
+ for (i = 0; i < 64; i++)
+- blf_enc(&state, cdata, sizeof(cdata) / sizeof(uint64_t));
++ blf_enc(&state, cdata, sizeof(cdata) / sizeof(uint32_t));
+
+ /* copy out */
+ for (i = 0; i < BCRYPT_BLOCKS; i++) {
diff --git a/app-crypt/reop/reop-2.1.1.ebuild b/app-crypt/reop/reop-2.1.1-r1.ebuild
index 6ce103535..0d22e5341 100644
--- a/app-crypt/reop/reop-2.1.1.ebuild
+++ b/app-crypt/reop/reop-2.1.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020-2021 Gentoo Authors
+# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -16,6 +16,11 @@ KEYWORDS="~amd64"
DEPEND="dev-libs/libsodium:="
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}/reop-2.1.1-base64-function-signatures.patch"
+ "${FILESDIR}/reop-2.1.1-bcrypt_hash-cdata-sizeof.patch"
+)
+
src_compile() {
emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="-lsodium ${LDFLAGS}"
}