Port: Remove _GNU_SOURCE, defined in config.h
[lttng-tools.git] / src / bin / lttng-relayd / viewer-stream.c
index 333246afb3f4d312874cca9cfc144e6cc0fdf932..623f94ca7fca4d059254d36bfc902ea030d17a03 100644 (file)
  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE
 #define _LGPL_SOURCE
 #include <common/common.h>
 #include <common/index/index.h>
+#include <common/compat/string.h>
 
 #include "lttng-relayd.h"
 #include "viewer-stream.h"
@@ -51,12 +51,12 @@ struct relay_viewer_stream *viewer_stream_create(struct relay_stream *stream,
                goto error;
        }
 
-       vstream->path_name = strndup(stream->path_name, LTTNG_VIEWER_PATH_MAX);
+       vstream->path_name = lttng_strndup(stream->path_name, LTTNG_VIEWER_PATH_MAX);
        if (vstream->path_name == NULL) {
                PERROR("relay viewer path_name alloc");
                goto error;
        }
-       vstream->channel_name = strndup(stream->channel_name,
+       vstream->channel_name = lttng_strndup(stream->channel_name,
                        LTTNG_VIEWER_NAME_MAX);
        if (vstream->channel_name == NULL) {
                PERROR("relay viewer channel_name alloc");
This page took 0.023171 seconds and 4 git commands to generate.