mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-21 23:46:26 -05:00
Improve FreeBSD compatibility
First draft. Need to investigate why upstream patches include certain function that appear to exist in FreeBSD 14.2.
This commit is contained in:
parent
dd906c8a4c
commit
b83bd5fd14
10 changed files with 117 additions and 27 deletions
|
|
@ -25,7 +25,11 @@
|
|||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
#include <sys/sysmacros.h>
|
||||
#ifdef __FreeBSD__
|
||||
# include <sys/types.h>
|
||||
#else
|
||||
# include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
namespace l
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,8 +18,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
# include <sys/param.h>
|
||||
# include <sys/mount.h>
|
||||
# define umount2(target,flags) unmount(target,flags)
|
||||
# define MNT_DETACH 0
|
||||
#else
|
||||
# include <sys/mount.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue