From 1c58dc6c0e4001334b20290d24d20cec9f81e638 Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Sat, 4 Jan 2025 20:29:18 +0100 Subject: Avoid global declarion of internal functions that are new in 3.17 _fuse_new() is not supposed to be called by external users outside of internal functions or static inlined functions. This also removes several functions from lib/fuse_versionscript which where added and exported by commit 58f85bfa9b7d ("Add in the libfuse version a program...) as these are libfuse internal only. Signed-off-by: Bernd Schubert --- include/fuse_lowlevel.h | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'include/fuse_lowlevel.h') diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index 3d398de..0fa2039 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -2045,26 +2045,8 @@ int fuse_parse_cmdline_312(struct fuse_args *args, #endif #endif -/* - * This should mostly not be called directly, but instead the fuse_session_new() - * macro should be used, which fills in the libfuse version compilation - * is done against automatically. - */ -struct fuse_session *_fuse_session_new_317(struct fuse_args *args, - const struct fuse_lowlevel_ops *op, - size_t op_size, - struct libfuse_version *version, - void *userdata); - /* Do not call this directly, but only through fuse_session_new() */ -#if (defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS)) -struct fuse_session * -_fuse_session_new(struct fuse_args *args, - const struct fuse_lowlevel_ops *op, - size_t op_size, - struct libfuse_version *version, - void *userdata); -#else +#if (!defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS)) struct fuse_session * _fuse_session_new_317(struct fuse_args *args, const struct fuse_lowlevel_ops *op, @@ -2116,6 +2098,12 @@ fuse_session_new(struct fuse_args *args, .padding = 0 }; + /* not declared globally, to restrict usage of this function */ + struct fuse_session *_fuse_session_new( + struct fuse_args *args, const struct fuse_lowlevel_ops *op, + size_t op_size, struct libfuse_version *version, + void *userdata); + return _fuse_session_new(args, op, op_size, &version, userdata); } -- cgit v1.2.3