return __sys_releasedir(path, fi);
}
-#ifdef HAVE_FUSE3
+#if HAVE_FUSE3
static int lxcfs_getattr(const char *path, struct stat *sb, struct fuse_file_info *fi)
#else
static int lxcfs_getattr(const char *path, struct stat *sb)
return -ENOENT;
}
-#ifdef HAVE_FUSE3
+#if HAVE_FUSE3
static int lxcfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags flags)
#else
return -EPERM;
}
-#ifdef HAVE_FUSE3
+#if HAVE_FUSE3
int lxcfs_chown(const char *path, uid_t uid, gid_t gid, struct fuse_file_info *fi)
#else
int lxcfs_chown(const char *path, uid_t uid, gid_t gid)
* really make sense for cgroups. So just return 0 always but do
* nothing.
*/
-#ifdef HAVE_FUSE3
+#if HAVE_FUSE3
int lxcfs_truncate(const char *path, off_t newsize, struct fuse_file_info *fi)
#else
int lxcfs_truncate(const char *path, off_t newsize)
return -EPERM;
}
-#ifdef HAVE_FUSE3
+#if HAVE_FUSE3
int lxcfs_chmod(const char *path, mode_t mode, struct fuse_file_info *fi)
#else
int lxcfs_chmod(const char *path, mode_t mode)
return -ENOENT;
}
-#ifdef HAVE_FUSE3
+#if HAVE_FUSE3
static void *lxcfs_init(struct fuse_conn_info *conn, struct fuse_config *cfg)
#else
static void *lxcfs_init(struct fuse_conn_info *conn)
.create = NULL,
.destroy = NULL,
-#ifndef HAVE_FUSE3
+#if !HAVE_FUSE3
.fgetattr = NULL,
#endif
.fsyncdir = NULL,
-#ifndef HAVE_FUSE3
+#if !HAVE_FUSE3
.ftruncate = NULL,
.getdir = NULL,
#endif
.statfs = NULL,
.symlink = NULL,
.unlink = NULL,
-#ifndef HAVE_FUSE3
+#if !HAVE_FUSE3
.utime = NULL,
#endif
};
char *pidfile = NULL, *token = NULL;
char pidfile_buf[STRLITERALLEN(RUNTIME_PATH) + STRLITERALLEN("/lxcfs.pid") + 1] = {};
bool debug = false, foreground = false;
-#ifndef HAVE_FUSE3
+#if !HAVE_FUSE3
bool nonempty = false;
#endif
bool load_use = false;
/* default with fuse3 */
if (strcmp(token, "nonempty") == 0) {
- #ifndef HAVE_FUSE3
+ #if !HAVE_FUSE3
nonempty = true;
#endif
continue;
goto out;
}
-#ifndef HAVE_FUSE3
+#if !HAVE_FUSE3
if (nonempty) {
if (append_comma_separate(&new_fuse_opts, "nonempty")) {
lxcfs_error("Failed to copy fuse argument \"nonempty\"");
#ifndef __LXCFS_FUSE_COMPAT_H
#define __LXCFS_FUSE_COMPAT_H
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
+#include "config.h"
-#ifdef HAVE_FUSE3
+#if HAVE_FUSE3
#define DIR_FILLER(F,B,N,S,O) F(B,N,S,O,FUSE_FILL_DIR_PLUS)
#else
#define DIR_FILLER(F,B,N,S,O) F(B,N,S,O)
#endif
+
#endif /* __LXCFS_FUSE_COMPAT_H */