HomeFreeBSD

sysutils/lttng-tools: fix obtaining HOST_NAME_MAX

Description

sysutils/lttng-tools: fix obtaining HOST_NAME_MAX

Using sysconf(3) API lead to accidental introduction of variable length arrays
(VLA) in the port. Additionally one patch hardcoded 256 as the HOST_NAME_MAX
even though the code doesn't expect an additional byte for the terminating NULL
byte in the struct definition.

Fall back to using _POSIX_HOST_NAME_MAX as the remaining code is not ready for
introducing sysconf(3) as a patch.

Remove #ifdef FreeBSD from our patches.

Bump PORTREVISION to rebuild with the new patch.

Sponsored by: Fudo Security
Differential Revision: https://reviews.freebsd.org/D30048

(cherry picked from commit aa34b0f42f0b02560ef68a9bd952206c02869e64)

Details

Provenance
a.wolk_fudosecurity.comAuthored on Apr 30 2021, 3:16 PM
jbeichCommitted on May 12 2021, 10:23 PM
Differential Revision
D30048: sysutils/lttng-tools: fix obtaining HOST_NAME_MAX
Parents
R11:55e05a1b3802: Chase GitLab redirect in PATCH_SITES (a la 64c25a7c484a)
Branches
Unknown
Tags
Unknown