diff --git a/pcp/Platform.c b/pcp/Platform.c index 4fcf3db1..91b92673 100644 --- a/pcp/Platform.c +++ b/pcp/Platform.c @@ -654,7 +654,8 @@ void Platform_setZfsCompressedArcValues(Meter* this) { } void Platform_getHostname(char* buffer, size_t size) { - pmGetHostName(pcp->context, buffer, size); + const char* hostname = pmGetContextHostName(pcp->context); + String_safeStrncpy(buffer, hostname, size); } void Platform_getRelease(char** string) {