From e16ae4d08029835af9340fcb30047c09930792fe Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Wed, 15 Mar 2017 16:57:20 -0700 Subject: 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 --- recipes-security/samhain/files/c99_dnmalloc.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 recipes-security/samhain/files/c99_dnmalloc.patch (limited to 'recipes-security/samhain/files') 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 @@ +samhain: musl build fix c99 + +Upstream-Status: Submitted +Signed-off-by: Armin Kuster + +Index: samhain-4.2.0/src/dnmalloc.c +=================================================================== +--- samhain-4.2.0.orig/src/dnmalloc.c ++++ samhain-4.2.0/src/dnmalloc.c +@@ -5524,7 +5524,7 @@ arc4_stir(void) + struct { + struct timeval tv1; + struct timeval tv2; +- u_int rnd[(128 - 2*sizeof(struct timeval)) / sizeof(u_int)]; ++ unsigned char rnd[(128 - 2*sizeof(struct timeval)) / sizeof(unsigned char)]; + } rdat; + #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) + ssize_t sz = 0; -- cgit v1.2.3-54-g00ecf