From c706ad9ca07dff0ef4abd69b008bb7819d3bf1f7 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 7 Nov 2005 15:30:48 +0000 Subject: fix --- include/fuse_lowlevel.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'include/fuse_lowlevel.h') diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index f90d021..d2b43a2 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -13,6 +13,14 @@ * Low level API * * =========================================================== */ +/* IMPORTANT: you should define FUSE_USE_VERSION before including this + header. To use the newest API define it to 25 (recommended for any + new application), to use the old API define it to 24 (default) */ + +#ifndef FUSE_USE_VERSION +#define FUSE_USE_VERSION 24 +#endif + #include "fuse_common.h" #include @@ -1198,6 +1206,23 @@ int fuse_chan_send(struct fuse_chan *ch, const struct iovec iov[], */ void fuse_chan_destroy(struct fuse_chan *ch); +/* ----------------------------------------------------------- * + * Compatibility stuff * + * ----------------------------------------------------------- */ + +#if FUSE_USE_VERSION == 24 +#include + +int fuse_reply_statfs_compat(fuse_req_t req, const struct statfs *stbuf); + +#undef FUSE_MINOR_VERSION +#define FUSE_MINOR_VERSION 4 +#define fuse_reply_statfs fuse_reply_statfs_compat + +#elif FUSE_USE_VERSION < 25 +# error Compatibility with low level API version other than 24 not supported +#endif + #ifdef __cplusplus } #endif -- cgit v1.2.3