From 19cb78a7e9854f6a68f0ed0a97e86df8208c4e3e Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Sat, 8 Feb 2025 14:14:43 +0100 Subject: [PATCH] Make fuse_main a macro again and wrap that to fuse_main_fn As suggested by Bill in Issue #1092 make fuse_main a macro again, just in case some applications expect it to be a macro. Signed-off-by: Bernd Schubert --- include/fuse.h | 8 +++++--- lib/fuse_versionscript | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/fuse.h b/include/fuse.h index 70d0d13..ae8d80e 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -960,9 +960,9 @@ static inline int fuse_main_real(int argc, char *argv[], * * Example usage, see hello.c */ -static inline int -fuse_main(int argc, char *argv[], const struct fuse_operations *op, - void *user_data) +static inline int fuse_main_fn(int argc, char *argv[], + const struct fuse_operations *op, + void *user_data) { struct libfuse_version version = { .major = FUSE_MAJOR_VERSION, @@ -980,6 +980,8 @@ fuse_main(int argc, char *argv[], const struct fuse_operations *op, return fuse_main_real_versioned(argc, argv, op, sizeof(*(op)), &version, user_data); } +#define fuse_main(argc, argv, op, user_data) \ + fuse_main_fn(argc, argv, op, user_data) /* ----------------------------------------------------------- * * More detailed API * diff --git a/lib/fuse_versionscript b/lib/fuse_versionscript index 78df3f0..b31453b 100644 --- a/lib/fuse_versionscript +++ b/lib/fuse_versionscript @@ -189,7 +189,7 @@ FUSE_3.12 { FUSE_3.17 { global: - fuse_main_real_317; + fuse_main_real_versioned; #if !defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS) _fuse_session_new_317; _fuse_new_317; -- 2.30.2