Opened 8 years ago

Closed 8 years ago

#415 closed defect (fixed)

Build issue with musl libc

Reported by: rainer Owned by: rainer
Priority: major Milestone: 4.2.1
Component: main Version:
Keywords: Cc:

Description

Reported by A. Kuster:

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)];
| ^~~~~

Patch provided is:

Index: samhain-4.2.0/src/dnmalloc.c
===================================================================
--- samhain-4.2.0.orig/src/dnmalloc.c
+++ samhain-4.2.0/src/dnmalloc.c
@@ -821,7 +821,7 @@ extern Void_t* sbrk();
/* On *BSD, malloc.h is deprecated, and on some *BSD including
* it may actually raise an error.
*/
-#if defined(HAVE_MALLOC_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+#if defined(HAVE_MALLOC_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && defined(__GLIBC__)
#include <malloc.h>
#else

@@ -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;

Change History (1)

comment:1 by rainer, 8 years ago

Resolution: fixed
Status: newclosed

Believed to be fixed by changeset [520].

Note: See TracTickets for help on using tickets.