Misc fixes, mostly for FreeBSD

This commit is contained in:
Antonio SJ Musumeci 2025-09-26 11:38:01 -05:00
parent 7a9c3b7eb2
commit 17d807462b
27 changed files with 146 additions and 140 deletions

View file

@ -8,16 +8,16 @@ namespace fs
struct dirent64
{
public:
uint64_t d_ino;
int64_t d_off;
uint16_t d_reclen;
uint8_t d_type;
char d_name[];
uint64_t ino;
int64_t off;
uint16_t reclen;
uint8_t type;
char name[];
public:
int d_namelen() const
int namelen() const
{
return (d_reclen - offsetof(dirent64,d_name));
return (reclen - offsetof(dirent64,name));
}
};
}

View file

@ -526,12 +526,12 @@ struct fuse_operations
* destination. Effectively doing an inefficient copy of the
* data.
*/
ssize_t (*copy_file_range)(const fuse_file_info_t *fi_in,
off_t offset_in,
const fuse_file_info_t *fi_out,
off_t offset_out,
size_t size,
int flags);
ssize_t (*copy_file_range)(const fuse_file_info_t *src_fi,
off_t src_off,
const fuse_file_info_t *dst_fi,
off_t dst_off,
const size_t size,
const unsigned int flags);
ssize_t (*setupmapping)(uint64_t *fh_,
uint64_t foffset_,

View file

@ -77,7 +77,7 @@ public:
template<typename FuncType>
[[nodiscard]]
std::future<typename std::result_of<FuncType()>::type>
std::future<std::invoke_result_t<FuncType>>
enqueue_task(FuncType&& func_);
public:
@ -340,10 +340,10 @@ ThreadPool::enqueue_work(FuncType &&func_)
template<typename FuncType>
[[nodiscard]]
inline
std::future<typename std::result_of<FuncType()>::type>
std::future<std::invoke_result_t<FuncType>>
ThreadPool::enqueue_task(FuncType&& func_)
{
using TaskReturnType = typename std::result_of<FuncType()>::type;
using TaskReturnType = std::invoke_result_t<FuncType>;
using Promise = std::promise<TaskReturnType>;
Promise promise;