File: hide-lttng-ctl-erroneously-exported-symbols.patch

package info (click to toggle)
ltt-control 2.13.15-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 17,656 kB
  • sloc: ansic: 167,287; sh: 27,018; makefile: 2,828; python: 1,380; yacc: 692; lex: 129; java: 109; perl: 99; cpp: 35; xml: 23
file content (52 lines) | stat: -rw-r--r-- 1,437 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From dba721fee08c842f7901e385ad5da68e7bdb26f4 Mon Sep 17 00:00:00 2001
From: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Date: Mon, 14 Apr 2025 16:50:31 -0400
Subject: [PATCH] Fix: lttng-ctl: hide erroneously exported symbols

The 2.13.15 release mistakenly exports two new symbols:

- utils_check_enough_available_memory
- utils_get_cpu_count

Both were introduced by fixes that appeared in that release (see
f923143b93 and 065114a58e) when they were backported from the master
branch.

The two symbols are hidden using the LTTNG_HIDDEN macro.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ic658abf311031d09be02874db95484028293d06d
---

diff --git a/src/common/utils.c b/src/common/utils.c
index 298474a..8adae13 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -1381,6 +1381,7 @@
 	return ret;
 }
 
+LTTNG_HIDDEN
 enum lttng_error_code utils_get_cpu_count(unsigned int *count)
 {
 	unsigned int _id = 0;
@@ -1398,6 +1399,7 @@
 	return ret;
 }
 
+LTTNG_HIDDEN
 enum lttng_error_code utils_check_enough_available_memory(
 		uint64_t num_bytes_requested, uint64_t *num_bytes_available)
 {
diff --git a/src/common/utils.h b/src/common/utils.h
index 95ec4e3..47b0ce8 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -15,6 +15,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#include <common/macros.h>
 #include <common/compat/directory-handle.h>
 
 #define KIBI_LOG2 10