Files
haikuports/dev-libs/libgcrypt/patches/libgcrypt-1.10.2.patchset
2024-08-21 15:09:29 +00:00

127 lines
3.4 KiB
Plaintext

From 756a1b3afa8ca02929a720c6370c21db8377a4b8 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 5 Aug 2014 16:50:29 +0000
Subject: haiku patch
diff --git a/configure.ac b/configure.ac
index 24ec2eb..374057a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -839,6 +839,7 @@ fi
AC_SEARCH_LIBS(setsockopt, [socket], ,
[AC_SEARCH_LIBS(setsockopt, [socket], , , [-lnsl])])
AC_SEARCH_LIBS(setsockopt, [nsl])
+AC_SEARCH_LIBS(socket, [network])
##################################
#### Checks for header files. ####
--
2.45.2
From bf6eba3e9ede042647160c8fb7e6f963b877ad4c Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 6 Aug 2014 22:08:04 +0000
Subject: gcc2 patch
diff --git a/src/hwf-x86.c b/src/hwf-x86.c
index a1aa02e..ae73360 100644
--- a/src/hwf-x86.c
+++ b/src/hwf-x86.c
@@ -108,7 +108,7 @@ get_xgetbv(void)
unsigned int t_eax, t_edx;
asm volatile
- ("xgetbv\n\t"
+ (".byte 0x0f, 0x01, 0xd0\n\t"
: "=a" (t_eax), "=d" (t_edx)
: "c" (0)
);
--
2.45.2
From f06c46d95f61278d43cc2377de531e67d63a55e1 Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost>
Date: Wed, 17 Jan 2018 22:03:45 +0000
Subject: Do not use __GNUC_PATCHLEVEL__ if it's not defined.
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
index 58581da..d744765 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -74,9 +74,14 @@ extern "C" {
underscore they are subject to change without notice. */
#ifdef __GNUC__
+#ifdef __GNUC_PATCHLEVEL__
#define _GCRY_GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
+#else
+#define _GCRY_GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100)
+#endif
#if _GCRY_GCC_VERSION >= 30100
#define _GCRY_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__))
--
2.45.2
From 131cb12cb258cc37f28ea2b655091469c67488ae Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Wed, 23 Aug 2023 11:57:20 +0200
Subject: Fixes: field `area' has incomplete type with gcc2
diff --git a/cipher/pubkey.c b/cipher/pubkey.c
index 2341c86..2885c82 100644
--- a/cipher/pubkey.c
+++ b/cipher/pubkey.c
@@ -1275,7 +1275,7 @@ _gcry_pk_selftest (int algo, int extended, selftest_report_func_t report)
struct pk_random_override {
size_t len;
- unsigned char area[];
+ unsigned char area[1];
};
gpg_err_code_t
--
2.45.2
From 19dd46e141c1827529ef95ca11b215e9ec025aab Mon Sep 17 00:00:00 2001
From: Schrijvers Luc <begasus@gmail.com>
Date: Wed, 21 Aug 2024 16:28:23 +0200
Subject: random: Use getrandom only when it's appropriate
diff --git a/random/rndgetentropy.c b/random/rndgetentropy.c
index 513da0b..a6f3c4a 100644
--- a/random/rndgetentropy.c
+++ b/random/rndgetentropy.c
@@ -81,6 +81,7 @@ _gcry_rndgetentropy_gather_random (void (*add)(const void*, size_t,
do
{
_gcry_pre_syscall ();
+#ifdef GRND_RANDOM
if (fips_mode ())
{
/* DRBG chaining defined in SP 800-90A (rev 1) specify
@@ -98,6 +99,7 @@ _gcry_rndgetentropy_gather_random (void (*add)(const void*, size_t,
ret = getrandom (buffer, nbytes, GRND_RANDOM);
}
else
+#endif
{
nbytes = length < sizeof (buffer) ? length : sizeof (buffer);
ret = getentropy (buffer, nbytes);
--
2.45.2