summaryrefslogtreecommitdiffstats
path: root/recipes-security/samhain/files
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2017-03-15 16:57:20 -0700
committerArmin Kuster <akuster808@gmail.com>2017-03-27 14:57:26 -0700
commite16ae4d08029835af9340fcb30047c09930792fe (patch)
tree27462e7f2cd74a55627b9078aa35b527adc67e4e /recipes-security/samhain/files
parent4c4fa8c5036da1c3d8d3e7d5849f28cc47e95bb8 (diff)
downloadmeta-security-e16ae4d08029835af9340fcb30047c09930792fe.tar.gz
samhain: fix build issues when using musl
[v2]: Correct musl malloc fix. remove HAVE_MALLOC_H define; this enables using the included defined mallinfo. [V1]: Fix c99 x_dnmalloc.c:563:26: error: return type is an incomplete type | #define public_mALLINFo mallinfo | ^ | x_dnmalloc.c:1689:17: note: in expansion of macro 'public_mALLINFo' | struct mallinfo public_mALLINFo() { and _dnmalloc.c:5527:17: error: unknown type name 'u_int' | u_int rnd[(128 - 2*sizeof(struct timeval)) / sizeof(u_int)]; | ^~~~~ Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'recipes-security/samhain/files')
-rw-r--r--recipes-security/samhain/files/c99_dnmalloc.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/recipes-security/samhain/files/c99_dnmalloc.patch b/recipes-security/samhain/files/c99_dnmalloc.patch
new file mode 100644
index 0000000..2216564
--- /dev/null
+++ b/recipes-security/samhain/files/c99_dnmalloc.patch
@@ -0,0 +1,18 @@
1samhain: musl build fix c99
2
3Upstream-Status: Submitted
4Signed-off-by: Armin Kuster <akuster@mvista.com>
5
6Index: samhain-4.2.0/src/dnmalloc.c
7===================================================================
8--- samhain-4.2.0.orig/src/dnmalloc.c
9+++ samhain-4.2.0/src/dnmalloc.c
10@@ -5524,7 +5524,7 @@ arc4_stir(void)
11 struct {
12 struct timeval tv1;
13 struct timeval tv2;
14- u_int rnd[(128 - 2*sizeof(struct timeval)) / sizeof(u_int)];
15+ unsigned char rnd[(128 - 2*sizeof(struct timeval)) / sizeof(unsigned char)];
16 } rdat;
17 #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
18 ssize_t sz = 0;