Misc cleanup for FreeBSD and clang (#1560)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled

This commit is contained in:
trapexit 2025-11-01 18:04:28 -05:00 • committed by Antonio SJ Musumeci
parent 2412ae7316
commit 41b65ae9e8
9 changed files with 25 additions and 64 deletions

View file

@ -52,6 +52,9 @@ public:
Branch(const Branch&);
Branch(const u64 &default_minfreespace);
public:
Branch& operator=(const Branch&) = default;
public:
bool ro(void) const;
bool nc(void) const;

View file

@ -6,7 +6,7 @@
# include <sys/syscall.h>
# include <unistd.h>
#else
#warning "ioprio not supported on this platform"
#pragma message "ioprio not supported on this platform"
#endif
enum

View file

@ -20,17 +20,6 @@
static int g_PROCFS_DIR_FD = -1;
namespace procfs { int PROC_SELF_FD_FD = -1; }
static constexpr const char PROCFS_PATH[] = "/proc";
static constexpr const char PROC_SELF_FD[] = "/proc/self/fd";
// This is critical to the function of the app. abort if failed to
// open.
static
void
_open_proc_self_fd()
{
procfs::PROC_SELF_FD_FD = fs::open(PROC_SELF_FD,O_PATH|O_DIRECTORY);
assert(procfs::PROC_SELF_FD_FD >= 0);
}
int
procfs::init()
@ -47,7 +36,12 @@ procfs::init()
g_PROCFS_DIR_FD = rv;
#if defined(__linux__)
::_open_proc_self_fd();
// This is critical to the function of the app. abort if failed to
// open.
static constexpr const char PROC_SELF_FD[] = "/proc/self/fd";
procfs::PROC_SELF_FD_FD = fs::open(PROC_SELF_FD,O_PATH|O_DIRECTORY);
assert(procfs::PROC_SELF_FD_FD >= 0);
#endif
return 0;

View file

@ -16,6 +16,8 @@
#pragma once
#include "fuse_req_ctx.h"
#include <pthread.h>
#include <sys/stat.h>
#include <sys/types.h>

View file

@ -30,7 +30,7 @@
# include <sys/xattr.h>
# else
# undef USE_XATTR
# warning "USE_XATTR unset: xattrs disabled"
# pragma message "USE_XATTR unset: xattrs disabled"
# endif
#endif