diff --git a/security/samhain/Makefile b/security/samhain/Makefile index 6638f656c070..c54b2e30c0cb 100644 --- a/security/samhain/Makefile +++ b/security/samhain/Makefile @@ -14,7 +14,7 @@ LICENSE= GPLv2 BROKEN_mips= fails to configure: error: Could not find the libwrap library BROKEN_mips64= fails to configure: error: Could not find the libwrap library -USES= sbrk shebangfix +USES= shebangfix SHEBANG_FILES= scripts/samhainadmin-gpg.pl.in \ scripts/samhainadmin-sig.pl.in diff --git a/security/samhain/files/patch-src_dnmalloc.c b/security/samhain/files/patch-src_dnmalloc.c new file mode 100644 index 000000000000..3ea627f5bf98 --- /dev/null +++ b/security/samhain/files/patch-src_dnmalloc.c @@ -0,0 +1,21 @@ +--- 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 + +