From 58f85bfa9b7dca9a216cd0bb4e38e9cdf4b661da Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Mon, 13 May 2024 12:32:06 +0200 Subject: Add in the libfuse version a program was compiled with (#942) The API stays the same, the libfuse version comes from inlined functions, which are defined fuse_lowlevel.h and fuse.h. As these inlined functions are defined in the header files they get added into the application, similar as if these were preprocessor macros. Macro vs inlined function is then just a style issue - I personally prefer the latter. fuse_session_new() -> static inlinei, in the application _fuse_session_new -> inside of libfuse fuse_new() -> static inline, in the application _fuse_new() -> inside of libfuse Note: Entirely untested is the fuse 30 api - we need a test for it. And we do not have any ABI tests at all. Signed-off-by: Bernd Schubert --- lib/fuse_i.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/fuse_i.h') diff --git a/lib/fuse_i.h b/lib/fuse_i.h index 74cfe36..7a2ae04 100644 --- a/lib/fuse_i.h +++ b/lib/fuse_i.h @@ -65,6 +65,11 @@ struct fuse_session { struct fuse_notify_req notify_list; size_t bufsize; int error; + + /* This is useful if any kind of ABI incompatibility is found at + * a later version, to 'fix' it at run time. + */ + struct libfuse_version version; }; struct fuse_chan { -- cgit v1.2.3