Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147637408
D30048.1783950862.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D30048.1783950862.diff
View Options
diff --git a/sysutils/lttng-tools/Makefile b/sysutils/lttng-tools/Makefile
--- a/sysutils/lttng-tools/Makefile
+++ b/sysutils/lttng-tools/Makefile
@@ -2,7 +2,7 @@
PORTNAME= lttng-tools
PORTVERSION= 2.9.3
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= sysutils
MASTER_SITES= http://lttng.org/files/${PORTNAME}/
diff --git a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_consumer.c b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_consumer.c
--- a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_consumer.c
+++ b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_consumer.c
@@ -1,12 +1,19 @@
---- src/bin/lttng-sessiond/consumer.c.orig 2016-11-29 22:48:37 UTC
-+++ src/bin/lttng-sessiond/consumer.c
-@@ -635,6 +635,9 @@ int consumer_set_network_uri(struct cons
+--- src/bin/lttng-sessiond/consumer.c.orig 2017-01-09 19:26:28 UTC
++++ src/bin/lttng-sessiond/consumer.c
+@@ -17,6 +17,7 @@
+
+ #define _LGPL_SOURCE
+ #include <assert.h>
++#include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -635,7 +636,7 @@ int consumer_set_network_uri(struct consumer_output *o
{
int ret;
char tmp_path[PATH_MAX];
-+#if defined(__FreeBSD__)
-+ const size_t HOST_NAME_MAX = sysconf(_SC_HOST_NAME_MAX);
-+#endif
- char hostname[HOST_NAME_MAX];
+- char hostname[HOST_NAME_MAX];
++ char hostname[_POSIX_HOST_NAME_MAX];
struct lttng_uri *dst_uri = NULL;
+ /* Code flow error safety net. */
diff --git a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_session.h b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_session.h
--- a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_session.h
+++ b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_session.h
@@ -1,14 +1,11 @@
---- src/bin/lttng-sessiond/session.h.orig 2016-11-29 22:48:37 UTC
+--- src/bin/lttng-sessiond/session.h.orig 2017-01-09 19:26:28 UTC
+++ src/bin/lttng-sessiond/session.h
-@@ -60,7 +60,11 @@ struct ltt_session_list {
+@@ -60,7 +60,7 @@ struct ltt_session_list {
*/
struct ltt_session {
char name[NAME_MAX];
-+#if defined(__FreeBSD__)
-+ char hostname[256]; /* Local hostname. */
-+#else
- char hostname[HOST_NAME_MAX]; /* Local hostname. */
-+#endif
+- char hostname[HOST_NAME_MAX]; /* Local hostname. */
++ char hostname[_POSIX_HOST_NAME_MAX]; /* Local hostname. */
struct ltt_kernel_session *kernel_session;
struct ltt_ust_session *ust_session;
/*
diff --git a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_ust-metadata.c b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_ust-metadata.c
--- a/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_ust-metadata.c
+++ b/sysutils/lttng-tools/files/patch-src_bin_lttng-sessiond_ust-metadata.c
@@ -1,6 +1,6 @@
---- src/bin/lttng-sessiond/ust-metadata.c.orig 2016-11-29 22:48:37 UTC
+--- src/bin/lttng-sessiond/ust-metadata.c.orig 2017-01-09 19:26:28 UTC
+++ src/bin/lttng-sessiond/ust-metadata.c
-@@ -50,6 +50,7 @@ int _lttng_field_statedump(struct ust_re
+@@ -50,6 +50,7 @@ int _lttng_field_statedump(struct ust_registry_session
const struct ustctl_field *fields, size_t nr_fields,
size_t *iter_field, size_t nesting);
@@ -16,13 +16,21 @@
static inline
int get_count_order(unsigned int count)
-@@ -879,6 +881,9 @@ int ust_metadata_session_statedump(struc
+@@ -879,7 +881,7 @@ int ust_metadata_session_statedump(struct ust_registry
char uuid_s[UUID_STR_LEN],
clock_uuid_s[UUID_STR_LEN];
int ret = 0;
-+#if defined(__FreeBSD__)
-+ const size_t HOST_NAME_MAX = sysconf(_SC_HOST_NAME_MAX);
-+#endif
- char hostname[HOST_NAME_MAX];
+- char hostname[HOST_NAME_MAX];
++ char hostname[_POSIX_HOST_NAME_MAX];
assert(session);
+
+@@ -940,7 +942,7 @@ int ust_metadata_session_statedump(struct ust_registry
+ hostname[0] = '\0';
+ ret = gethostname(hostname, sizeof(hostname));
+ if (ret && errno == ENAMETOOLONG)
+- hostname[HOST_NAME_MAX - 1] = '\0';
++ hostname[_POSIX_HOST_NAME_MAX - 1] = '\0';
+ ret = lttng_metadata_printf(session,
+ "env {\n"
+ " hostname = \"%s\";\n"
diff --git a/sysutils/lttng-tools/files/patch-src_bin_lttng_commands_view.c b/sysutils/lttng-tools/files/patch-src_bin_lttng_commands_view.c
--- a/sysutils/lttng-tools/files/patch-src_bin_lttng_commands_view.c
+++ b/sysutils/lttng-tools/files/patch-src_bin_lttng_commands_view.c
@@ -1,12 +1,19 @@
---- src/bin/lttng/commands/view.c.orig 2016-11-29 22:48:37 UTC
+--- src/bin/lttng/commands/view.c.orig 2017-01-09 19:26:28 UTC
+++ src/bin/lttng/commands/view.c
-@@ -269,6 +269,9 @@ static char *build_live_path(char *sessi
+@@ -17,6 +17,7 @@
+
+ #define _LGPL_SOURCE
+ #include <popt.h>
++#include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -269,7 +270,7 @@ static char *build_live_path(char *session_name)
{
int ret;
char *path = NULL;
-+#if defined(__FreeBSD__)
-+ const size_t HOST_NAME_MAX = sysconf(_SC_HOST_NAME_MAX);
-+#endif
- char hostname[HOST_NAME_MAX];
+- char hostname[HOST_NAME_MAX];
++ char hostname[_POSIX_HOST_NAME_MAX];
ret = gethostname(hostname, sizeof(hostname));
+ if (ret < 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 13, 1:54 PM (17 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29112418
Default Alt Text
D30048.1783950862.diff (5 KB)
Attached To
Mode
D30048: sysutils/lttng-tools: fix obtaining HOST_NAME_MAX
Attached
Detach File
Event Timeline
Log In to Comment