ports/sysutils/bacula11-server/files/patch-src_lib_bsys.c
Dan Langille 103b3de990 sysutils/bacula11*: revert 'Remove expired bacula11 ports"
I'm a month early.

This reverts commit ea825e27e6.

In order to commit this revert, I had to remove distinfo from
net-mgmt/nagios-check_bacula11 because it did not contain a
timestamp - the file is not required because it is a slave
port.
2024-09-01 11:42:04 +00:00

29 lines
700 B
C

--- src/lib/bsys.c.orig
+++ src/lib/bsys.c
@@ -1270,7 +1270,7 @@
/*
* Determine the amount of heap used
* macOS - sbrk(0) is deprecated, use malloc info
- * Windows - not implemented
+ * Windows - not implemented and FreeBSD
* others - use sbrk(0)
*/
@@ -1279,7 +1279,7 @@
void mark_heap()
{
-#if defined(HAVE_WIN32)
+#if defined(HAVE_WIN32) || defined(__FreeBSD__)
start_heap = 0;
#elif defined(HAVE_DARWIN_OS)
struct mstats ms = mstats();
@@ -1296,6 +1296,8 @@
#elif defined(HAVE_DARWIN_OS)
struct mstats ms = mstats();
return (int64_t) ms.bytes_used - start_heap;
+#elif defined(__FreeBSD__)
+ return 0;
#else
return (int64_t) sbrk(0) - start_heap;
#endif