From 3a081f7ee2aa1ca34432548f49a1ea6c1d469c31 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 22 Apr 2024 15:52:28 -0400 Subject: [PATCH] lttng-ctl: Hide symbol introduced by fix MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jérémie Galarneau Change-Id: I874538317617003eb1c58c2d3b7b0a2bdf905ef7 --- src/common/lockfile.c | 1 + src/common/lockfile.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/common/lockfile.c b/src/common/lockfile.c index bf1ddf9e3..048caa2d0 100644 --- a/src/common/lockfile.c +++ b/src/common/lockfile.c @@ -66,6 +66,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; diff --git a/src/common/lockfile.h b/src/common/lockfile.h index 1f8e01ddb..67bae3046 100644 --- a/src/common/lockfile.h +++ b/src/common/lockfile.h @@ -8,6 +8,8 @@ #ifndef COMMON_LOCKFILE_H #define COMMON_LOCKFILE_H +#include + /* * 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 */ -- 2.34.1