hostname is not const, but mh_uuid() returns a const char *. Just cast away the const to silence the warning.
Signed-off-by: Russell Bryant russell@russellbryant.net --- src/lib/utilities.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/lib/utilities.c b/src/lib/utilities.c index cad41eb..b1fcc67 100644 --- a/src/lib/utilities.c +++ b/src/lib/utilities.c @@ -348,7 +348,7 @@ mh_hostname(void)
if(hostname != NULL && strcmp(hostname, "localhost") == 0) { free(hostname); - hostname = mh_uuid(); + hostname = (char *) mh_uuid(); }
mh_trace("Got hostname: %s", hostname);