From c36a763ba5727f861b66b78abb8554f6e49ab69e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 6 Sep 2019 12:21:58 -0400 Subject: [PATCH] Fix: strndup does not exist on Solaris 10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit strndup does not exist on Solaris 10. Use the lttng_strndup compatibility wrapper. Signed-off-by: Jérémie Galarneau --- src/common/trace-chunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/trace-chunk.c b/src/common/trace-chunk.c index 40e612800..fe244ac36 100644 --- a/src/common/trace-chunk.c +++ b/src/common/trace-chunk.c @@ -656,7 +656,7 @@ int add_top_level_directory_unique(struct lttng_trace_chunk *chunk, } if (!found) { - char *copy = strndup(new_path, new_path_top_level_len); + char *copy = lttng_strndup(new_path, new_path_top_level_len); DBG("Adding new top-level directory \"%s\" to trace chunk \"%s\"", new_path, chunk->name ? : "(unnamed)"); -- 2.34.1