From: Jérémie Galarneau Date: Fri, 6 Sep 2019 16:21:58 +0000 (-0400) Subject: Fix: strndup does not exist on Solaris 10 X-Git-Tag: v2.11.0-rc3~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ebd50a97190fd35bf428f807d9d0ff4234ee9f05;p=lttng-tools.git Fix: strndup does not exist on Solaris 10 strndup does not exist on Solaris 10. Use the lttng_strndup compatibility wrapper. Signed-off-by: Jérémie Galarneau --- 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)");