Fix warning: src/bin/lttng/utils.c: cast incompatible pointer
[lttng-tools.git] / src / bin / lttng / utils.c
index 802e0971bd6785c2853e0ffeb1d88b0edc03a5a4..1e518f883d49b4bf640a09f1b799c760926fe673 100644 (file)
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <inttypes.h>
+#include <unistd.h>
 
 #include <common/error.h>
 #include <common/utils.h>
+#include <common/defaults.h>
 
 #include "conf.h"
 #include "utils.h"
@@ -385,7 +387,7 @@ int check_relayd(void)
         * A successful connect means the relayd exists thus returning 0 else a
         * negative value means it does NOT exists.
         */
-       ret = connect(fd, &sin, sizeof(sin));
+       ret = connect(fd, (struct sockaddr *) &sin, sizeof(sin));
        if (ret < 0) {
                /* Not found. */
                ret = 0;
@@ -479,3 +481,14 @@ void print_session_stats(const char *session_name)
 end:
        return;
 }
+
+int show_cmd_man_page(const char *cmd_name)
+{
+       int ret;
+       char page_name[32];
+
+       ret = sprintf(page_name, "lttng-%s", cmd_name);
+       assert(ret > 0 && ret < 32);
+
+       return utils_show_man_page(1, page_name);
+}
This page took 0.024388 seconds and 4 git commands to generate.