void-packages/srcpkgs/gkrellm/patches/libressl.patch
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

35 lines
972 B
Diff

diff --git src/mail.c src/mail.c
index 6615f31..205b56f 100644
--- a/src/mail.c
+++ b/src/mail.c
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
static void
ssl_locking_cb(int mode, int n, const char *file, int line)
{
@@ -452,7 +452,7 @@ update_tooltip(void)
MailAccount *account;
GString *mboxes = NULL;
gchar buf[128];
-
+
if (show_tooltip)
{
mboxes = g_string_sized_new(512);
@@ -4399,8 +4399,10 @@ gkrellm_init_mail_monitor(void)
ssl_locks[i] = g_new(GMutex, 1);
g_mutex_init(ssl_locks[i]);
}
+#ifndef LIBRESSL_VERSION_NUMBER
CRYPTO_set_locking_callback(ssl_locking_cb);
#endif
+#endif
#endif
mail_fetch = g_new0(Mailbox, 1);
@@ -4526,4 +4528,3 @@ gkrellm_destroy_external_mbox(gpointer mbox_ptr)
}
/* =======================================================================*/
-