lttng-ctl: Hide symbol introduced by fix
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 22 Apr 2024 19:52:28 +0000 (15:52 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 8 Jul 2024 15:12:50 +0000 (11:12 -0400)
Michael Jeanson noticed that f94318611 mistakenly introduces a new
public symbol in liblttng-ctl.so. This change was not intended and is
due to a bad backport of a fix initially developed against the master
branch.

The master branch (and upcoming version) of LTTng-tools is built with
the -fvisibility=hidden. Hence, the initial version of the fix had no
need to hide the utils_create_lock_file symbol.

Since the supported stable releases (2.12 and 2.13) are not built with
those options, that symbol has to be explicitly marked as hidden.

Reported-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I874538317617003eb1c58c2d3b7b0a2bdf905ef7

src/common/lockfile.cpp
src/common/lockfile.hpp

index 3e972fbac597baff8b915838553ae2581540baaa..aeafd85cd6c4b0f3b5b981735adecec3fae8b995 100644 (file)
@@ -64,6 +64,7 @@ static int lock_file(const char *filepath, int fd)
 
 #endif /* HAVE_FLOCK */
 
+LTTNG_HIDDEN
 int utils_create_lock_file(const char *filepath)
 {
        int ret, fd;
index 1f8e01ddb3eaaadb59abeaed946d34f0f9332f2c..67bae3046d1a7e75fcda1b2fc4a5eba9832d4fd2 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef COMMON_LOCKFILE_H
 #define COMMON_LOCKFILE_H
 
+#include <common/macros.h>
+
 /*
  * Create lock file to the given path and filename.
  * Returns the associated file descriptor, -1 on error.
@@ -20,6 +22,7 @@
  * forks+execve as the child process closes a file descriptor referencing
  * the file description of 'filepath'.
  */
+LTTNG_HIDDEN
 int utils_create_lock_file(const char *filepath);
 
 #endif /* COMMON_LOCKFILE_H */
This page took 0.026437 seconds and 4 git commands to generate.