aboutsummaryrefslogtreecommitdiffstats
path: root/lib/helper.c
diff options
context:
space:
mode:
authorBernd Schubert <bernd@bsbernd.com>2025-01-04 23:18:14 +0100
committerBernd Schubert <bernd@bsbernd.com>2025-02-10 16:56:45 +0100
commit1d134a0ccf8fe95ceb1ea3cdd723cb30c5cfcdf1 (patch)
tree33a262883950fab4717f531084c63a9edd235ded /lib/helper.c
parent0cab87aeff36503a74222e181d5206b2c77c9bb9 (diff)
downloadlibfuse-1d134a0ccf8fe95ceb1ea3cdd723cb30c5cfcdf1.tar.gz
Make fuse_main_real() not symboled
Addresses https://github.com/libfuse/libfuse/issues/1092 We actually don't need to make fuse_main_real() symboled, as it is not part of the official API. The inlined function now always calls into fuse_main_real_317 and the compat ABI function (which should also be available for dlopen/dlsym) is now always compiled, independent if the compiler/linker support versioned symbols. Additionally, fuse_main_real() is also declared as inlined function and a warning message is created when that function is called. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
Diffstat (limited to 'lib/helper.c')
-rw-r--r--lib/helper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/helper.c b/lib/helper.c
index 2794e66..660f029 100644
--- a/lib/helper.c
+++ b/lib/helper.c
@@ -304,9 +304,10 @@ int fuse_daemonize(int foreground)
return 0;
}
+/* Not symboled, as not part of the official API */
int fuse_main_real_317(int argc, char *argv[], const struct fuse_operations *op,
- size_t op_size, struct libfuse_version *version, void *user_data);
-FUSE_SYMVER("fuse_main_real_317", "fuse_main_real@@FUSE_3.17")
+ size_t op_size, struct libfuse_version *version,
+ void *user_data);
int fuse_main_real_317(int argc, char *argv[], const struct fuse_operations *op,
size_t op_size, struct libfuse_version *version, void *user_data)
{
@@ -400,14 +401,13 @@ out1:
return res;
}
+/* Not symboled, as not part of the official API */
int fuse_main_real_30(int argc, char *argv[], const struct fuse_operations *op,
size_t op_size, void *user_data);
-FUSE_SYMVER("fuse_main_real_30", "fuse_main_real@FUSE_3.0")
int fuse_main_real_30(int argc, char *argv[], const struct fuse_operations *op,
size_t op_size, void *user_data)
{
struct libfuse_version version = { 0 };
-
return fuse_main_real_317(argc, argv, op, op_size, &version, user_data);
}