Skip to content

Commit

Permalink
Merge pull request #316 from trapexit/debian-kfreebsd
Browse files Browse the repository at this point in the history
small tweaks to build on Debian kFreeBSD
  • Loading branch information
trapexit authored Sep 14, 2016
2 parents fa3218c + 7e423cd commit 12d2cf7
Show file tree
Hide file tree
Showing 75 changed files with 140 additions and 127 deletions.
2 changes: 1 addition & 1 deletion src/access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
#include <string>
#include <vector>

#include <errno.h>
#include <fcntl.h>
#include <unistd.h>

#include "config.hpp"
#include "errno.hpp"
#include "fs_path.hpp"
#include "rwlock.hpp"
#include "ugid.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/chmod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

#include <fuse.h>

#include <errno.h>
#include <string>
#include <vector>

#include "config.hpp"
#include "errno.hpp"
#include "fs_path.hpp"
#include "rv.hpp"
#include "rwlock.hpp"
Expand Down
3 changes: 1 addition & 2 deletions src/chown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@

#include <fuse.h>

#include <errno.h>

#include <string>
#include <vector>

#include "config.hpp"
#include "errno.hpp"
#include "fs_path.hpp"
#include "rv.hpp"
#include "rwlock.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/clone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include <unistd.h>
#include <string.h>

#include <iostream>

#include "errno.hpp"
#include "fs.hpp"
#include "fs_clonefile.hpp"
#include "fs_clonepath.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

#include <unistd.h>
#include <sys/stat.h>
#include <errno.h>

#include "config.hpp"
#include "rwlock.hpp"
#include "errno.hpp"
#include "fs.hpp"
#include "rwlock.hpp"

#define MINFREESPACE_DEFAULT (4294967295ULL)
#define POLICYINIT(X) X(policies[FuseFunc::Enum::X])
Expand Down
8 changes: 4 additions & 4 deletions src/create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@

#include <fuse.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>

#include <string>
#include <vector>

#include "config.hpp"
#include "errno.hpp"
#include "fileinfo.hpp"
#include "fs_path.hpp"
#include "fs_clonepath.hpp"
#include "fs_path.hpp"
#include "rwlock.hpp"
#include "ugid.hpp"

Expand Down
3 changes: 2 additions & 1 deletion src/create.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <sys/types.h>
#include <fuse.h>

#include <sys/types.h>

namespace mergerfs
{
namespace fuse
Expand Down
29 changes: 29 additions & 0 deletions src/errno.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
Copyright (c) 2016, Antonio SJ Musumeci <[email protected]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>

#if defined(ENODATA) && !defined(ENOATTR)
#define ENOATTR ENODATA
#endif

#if defined(ENOATTR) && !defined(ENODATA)
#define ENODATA ENOATTR
#endif

#if !defined(ENOATTR) && !defined(ENODATA)
#error "Neither ENOATTR or ENODATA defined: please contact mergerfs author with platform information"
#endif
5 changes: 2 additions & 3 deletions src/fallocate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@

#include <fuse.h>

#include <errno.h>

#include "fs_fallocate.hpp"
#include "errno.hpp"
#include "fileinfo.hpp"
#include "fs_fallocate.hpp"

static
int
Expand Down
2 changes: 1 addition & 1 deletion src/fgetattr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>

#include "errno.hpp"
#include "fileinfo.hpp"

static
Expand Down
2 changes: 1 addition & 1 deletion src/flush.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include <fuse.h>

#include <unistd.h>
#include <errno.h>

#include "errno.hpp"
#include "fileinfo.hpp"

static
Expand Down
2 changes: 1 addition & 1 deletion src/fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <string>
#include <vector>

#include <errno.h>
#include <fcntl.h>
#include <fcntl.h>
#include <glob.h>
Expand All @@ -29,6 +28,7 @@
#include <sys/types.h>
#include <unistd.h>

#include "errno.hpp"
#include "fs_attr.hpp"
#include "fs_path.hpp"
#include "fs_xattr.hpp"
Expand Down
3 changes: 2 additions & 1 deletion src/fs_attr_linux.icpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include <fcntl.h>
#include <linux/fs.h>
#include <sys/ioctl.h>
Expand All @@ -24,6 +23,8 @@

#include <string>

#include "errno.hpp"

using std::string;

namespace fs
Expand Down
8 changes: 5 additions & 3 deletions src/fs_attr_unsupported.icpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include <string>

#include "errno.hpp"

namespace fs
{
Expand All @@ -28,8 +30,8 @@ namespace fs
}

int
copy(const string &from,
const string &to)
copy(const std::string &from,
const std::string &to)
{
return ENOTSUP;
}
Expand Down
2 changes: 1 addition & 1 deletion src/fs_clonefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/stat.h>
Expand All @@ -24,6 +23,7 @@
#include <string>
#include <vector>

#include "errno.hpp"
#include "fs_attr.hpp"
#include "fs_fadvise.hpp"
#include "fs_fallocate.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/fs_clonepath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>

#include <string>

#include "fs_path.hpp"
#include "errno.h"
#include "fs_attr.hpp"
#include "fs_path.hpp"
#include "fs_xattr.hpp"

using std::string;
Expand Down
2 changes: 1 addition & 1 deletion src/fs_fadvise_posix.icpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include "errno.hpp"

namespace fs
{
Expand Down
2 changes: 1 addition & 1 deletion src/fs_fadvise_unsupported.icpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include "errno.hpp"

namespace fs
{
Expand Down
2 changes: 2 additions & 0 deletions src/fs_fallocate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <fcntl.h>

#ifdef __linux__
# include "fs_fallocate_linux.icpp"
#elif _XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L
Expand Down
2 changes: 2 additions & 0 deletions src/fs_fallocate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef __FS_FALLOCATE_HPP__
#define __FS_FALLOCATE_HPP__

#include <fcntl.h>

namespace fs
{
int
Expand Down
2 changes: 1 addition & 1 deletion src/fs_fallocate_linux.icpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include <fcntl.h>

#include "errno.hpp"
#include "fs_fallocate.hpp"

namespace fs
Expand Down
2 changes: 1 addition & 1 deletion src/fs_fallocate_osx.icpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include <fcntl.h>

#include "errno.hpp"
#include "fs_fallocate.hpp"

namespace fs
Expand Down
2 changes: 1 addition & 1 deletion src/fs_fallocate_posix.icpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include <fcntl.h>

#include "errno.hpp"
#include "fs_fallocate.hpp"

namespace fs
Expand Down
3 changes: 1 addition & 2 deletions src/fs_fallocate_unsupported.icpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>

#include "errno.hpp"
#include "fs_fallocate.hpp"

namespace fs
Expand Down
8 changes: 4 additions & 4 deletions src/fs_movefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>

#include <string>
#include <vector>

#include "fs.hpp"
#include "fs_path.hpp"
#include "fs_clonepath.hpp"
#include "fs_clonefile.hpp"
#include "fs_clonepath.hpp"
#include "fs_path.hpp"

using std::string;
using std::vector;
Expand Down
3 changes: 2 additions & 1 deletion src/fs_sendfile_linux.icpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include <sys/sendfile.h>

#include "errno.hpp"

namespace fs
{
ssize_t
Expand Down
3 changes: 2 additions & 1 deletion src/fs_sendfile_unsupported.icpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include <sys/types.h>

#include "errno.hpp"

namespace fs
{
ssize_t
Expand Down
2 changes: 1 addition & 1 deletion src/fs_xattr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/stat.h>
Expand All @@ -26,6 +25,7 @@
#include <map>
#include <sstream>

#include "errno.hpp"
#include "str.hpp"
#include "xattr.hpp"

Expand Down
Loading

0 comments on commit 12d2cf7

Please sign in to comment.