From: Michael Jeanson Date: Tue, 13 Oct 2020 21:54:27 +0000 (-0400) Subject: port: no HOST_NAME_MAX on FreeBSD, use LTTNG_HOST_NAME_MAX X-Git-Tag: v2.13.0-rc1~451 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=32aef76c03b38dfb5f423299357c478147358af4 port: no HOST_NAME_MAX on FreeBSD, use LTTNG_HOST_NAME_MAX Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau Change-Id: I83cc40a123539a668c25828144905b628df9fdef --- diff --git a/src/bin/lttng-sessiond/session.h b/src/bin/lttng-sessiond/session.h index e6ed40cc2..9b790c1fe 100644 --- a/src/bin/lttng-sessiond/session.h +++ b/src/bin/lttng-sessiond/session.h @@ -68,7 +68,7 @@ struct ltt_session { char name[NAME_MAX]; bool has_auto_generated_name; bool name_contains_creation_time; - char hostname[HOST_NAME_MAX]; /* Local hostname. */ + char hostname[LTTNG_HOST_NAME_MAX]; /* Local hostname. */ /* Path of the last closed chunk. */ char last_chunk_path[LTTNG_PATH_MAX]; time_t creation_time; diff --git a/src/bin/lttng/commands/view.c b/src/bin/lttng/commands/view.c index d7632b62b..a2623fe49 100644 --- a/src/bin/lttng/commands/view.c +++ b/src/bin/lttng/commands/view.c @@ -51,7 +51,7 @@ static char *build_live_path(char *session_name) { int ret; char *path = NULL; - char hostname[HOST_NAME_MAX]; + char hostname[LTTNG_HOST_NAME_MAX]; ret = gethostname(hostname, sizeof(hostname)); if (ret < 0) {