aboutsummaryrefslogtreecommitdiffstats
path: root/mail-filter/libmilter/files/libmilter-musl-stack-size.patch
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-07-10 09:15:07 +0200
committerWynn Wolf Arbor2020-07-10 09:15:07 +0200
commit2341b153502e3ddb091e3a47435db96634e8c3cc (patch)
treede21221b1801e6a5419f838b5d199c4afe15e0d2 /mail-filter/libmilter/files/libmilter-musl-stack-size.patch
parentceceb32aeb40407502d4f6cb9e0053fe3d0a665e (diff)
downloadpramantha-2341b153502e3ddb091e3a47435db96634e8c3cc.tar.gz
mail-filter/libmilter: Drop package
These fixes have been incorporated upstream via [1]. [1] https://github.com/gentoo/gentoo/pull/16139
Diffstat (limited to 'mail-filter/libmilter/files/libmilter-musl-stack-size.patch')
-rw-r--r--mail-filter/libmilter/files/libmilter-musl-stack-size.patch42
1 files changed, 0 insertions, 42 deletions
diff --git a/mail-filter/libmilter/files/libmilter-musl-stack-size.patch b/mail-filter/libmilter/files/libmilter-musl-stack-size.patch
deleted file mode 100644
index 9993adf..0000000
--- a/mail-filter/libmilter/files/libmilter-musl-stack-size.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Set default pthread stack size to 256 KB
-
-This patch tries to fix various crashes for applications depending on libmilter
-by setting the stack size for pthreads to 256 KB. The default stack size for
-musl libc is set to 80 KB whereas glibc has it set to 8 MB. This causes problems
-when a large amount of memory is allocated on the stack.
-
-For example, opendkim allocates blocks of 64 KB multiple times, which causes
-libmilter (and therefore opendkim) to crash. For now, a stack size of 256 KB
-looks sufficient and makes opendkim stop crashing.
-
-Fixes https://bugs.alpinelinux.org/issues/6360
-
---- a/libmilter/libmilter.h
-+++ b/libmilter/libmilter.h
-@@ -127,10 +127,10 @@
- # define MI_SOCK_READ(s, b, l) read(s, b, l)
- # define MI_SOCK_READ_FAIL(x) ((x) < 0)
- # define MI_SOCK_WRITE(s, b, l) write(s, b, l)
--
--# define thread_create(ptid,wr,arg) pthread_create(ptid, NULL, wr, arg)
- # define sthread_get_id() pthread_self()
-
-+extern int thread_create(pthread_t *ptid, void *(*wr) (void *), void *arg);
-+
- typedef pthread_mutex_t smutex_t;
- # define smutex_init(mp) (pthread_mutex_init(mp, NULL) == 0)
- # define smutex_destroy(mp) (pthread_mutex_destroy(mp) == 0)
---- a/libmilter/main.c
-+++ b/libmilter/main.c
-@@ -16,6 +16,12 @@
- #include <fcntl.h>
- #include <sys/stat.h>
-
-+int thread_create(pthread_t *ptid, void *(*wr) (void *), void *arg) {
-+ pthread_attr_t attr;
-+ pthread_attr_init(&attr);
-+ pthread_attr_setstacksize(&attr,256*1024);
-+ return pthread_create(ptid, &attr, wr, arg);
-+}
-
- static smfiDesc_ptr smfi = NULL;