aboutsummaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
authorGleb Popov <6yearold@gmail.com>2025-06-24 14:37:07 +0300
committerBernd Schubert <bernd@bsbernd.com>2025-06-25 13:04:59 +0200
commit8e649e8f5dbb1d619619643296b75db8ee63aa70 (patch)
tree11f5710a4bcb1ccb0cbc03d7e9a7b6acc3c7b356 /example
parentf8fe398ee14864e2c3c7c524ca851d7cc08bed28 (diff)
downloadlibfuse-8e649e8f5dbb1d619619643296b75db8ee63aa70.tar.gz
passthrough_hp: Fix compilation on systems without O_TMPFILE support
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Diffstat (limited to 'example')
-rw-r--r--example/passthrough_hp.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/example/passthrough_hp.cc b/example/passthrough_hp.cc
index 040bc75..e5edc1b 100644
--- a/example/passthrough_hp.cc
+++ b/example/passthrough_hp.cc
@@ -1012,6 +1012,7 @@ static Inode *create_new_inode(int fd, fuse_entry_param *e)
return p_inode;
}
+#ifdef O_TMPFILE
static void sfs_tmpfile(fuse_req_t req, fuse_ino_t parent, mode_t mode,
fuse_file_info *fi)
{
@@ -1049,7 +1050,7 @@ static void sfs_tmpfile(fuse_req_t req, fuse_ino_t parent, mode_t mode,
fuse_reply_create(req, &e, fi);
}
-
+#endif
static void sfs_fsyncdir(fuse_req_t req, fuse_ino_t ino, int datasync,
fuse_file_info *fi)
{
@@ -1378,7 +1379,9 @@ static void assign_operations(fuse_lowlevel_ops &sfs_oper)
sfs_oper.releasedir = sfs_releasedir;
sfs_oper.fsyncdir = sfs_fsyncdir;
sfs_oper.create = sfs_create;
+#ifdef O_TMPFILE
sfs_oper.tmpfile = sfs_tmpfile;
+#endif
sfs_oper.open = sfs_open;
sfs_oper.release = sfs_release;
sfs_oper.flush = sfs_flush;