Fix: strndup does not exist on Solaris 10
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 6 Sep 2019 16:21:58 +0000 (12:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 6 Sep 2019 17:22:27 +0000 (13:22 -0400)
strndup does not exist on Solaris 10. Use the lttng_strndup
compatibility wrapper.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/trace-chunk.c

index 40e612800a5c8e6dd31442593d27e94eea81fbbc..fe244ac36594ebbcec7c81f8b9b331d9540f7a59 100644 (file)
@@ -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)");
This page took 0.026224 seconds and 4 git commands to generate.