HomeFreeBSD

Fix libstatgrab on FreeBSD 12

Description

Fix libstatgrab on FreeBSD 12

On FreeBSD 12 (since r309017) v_cache_count no longer exists. A
compatibility shim is in place if COMPAT_FREEBSD11 is defined in
the kernel, but if not libstatgrab fails to return any memory
statistics. This patch modifies libstatgrab to mimic this compatibility
behaviour (ie. return 0), regardless of whether COMPAT_FREEBSD11
is defined, which ensures the remaining statistics are returned
correctly.

A more complete solution will be considered upstream and hopefully
be included in the next release.

Reported by: Alexey Milevsky <a.milevsky@gmail.com>

Details

Provenance
tdbAuthored on
Parents
rP490903: - Update to 1.7.37
Branches
Unknown
Tags
Unknown