4bfc940087
Samhain has an internal malloc implementation that uses sbrk and malloc. There's a fallback during initialization if sbrk fails so replace sbrk calls with a function that return the failure value ((void *)-1). PR: 275646 Approved by: freebsd@gregv.net (maintainer)
22 lines
328 B
C
22 lines
328 B
C
--- src/dnmalloc.c.orig
|
|
+++ src/dnmalloc.c
|
|
@@ -660,8 +660,18 @@
|
|
sample version for pre-OSX macos.
|
|
*/
|
|
|
|
+#ifdef __FreeBSD__
|
|
+static void *nosbrk(ptrdiff_t len __unused) {
|
|
+ return MORECORE_FAILURE;
|
|
+}
|
|
+#endif
|
|
+
|
|
#ifndef MORECORE
|
|
+#ifdef __FreeBSD__
|
|
+#define MORECORE nosbrk
|
|
+#else
|
|
#define MORECORE sbrk
|
|
+#endif
|
|
#endif
|
|
|
|
|