Make fuse_main a macro again and wrap that to fuse_main_fn
authorBernd Schubert <bernd@bsbernd.com>
Sat, 8 Feb 2025 13:14:43 +0000 (14:14 +0100)
committerBernd Schubert <bernd@bsbernd.com>
Mon, 10 Feb 2025 15:56:45 +0000 (16:56 +0100)
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 <bernd@bsbernd.com>
include/fuse.h
lib/fuse_versionscript

index 70d0d13ab9bff7fb2fa58d1d88b6d5eef4de2983..ae8d80ee42681120d1ab3c7bc6ebb4d03d391bd7 100644 (file)
@@ -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                                          *
index 78df3f0296e9c18d956b331da3fedc90ffc87e20..b31453b28a953d1f9664f3146360fac2b8a9ac0a 100644 (file)
@@ -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;