linux fixes

git-svn-id: https://profuse.googlecode.com/svn/branches/v2@272 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
ksherlock 2010-05-24 16:05:11 +00:00
parent e59ebb4d53
commit 0db1d92287
2 changed files with 18 additions and 9 deletions

View File

@ -152,14 +152,16 @@ bool make_mount_dir(std::string name, std::string &path)
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
extern void init_ops(fuse_lowlevel_ops *ops); extern void init_ops(fuse_lowlevel_ops *ops);
struct options options = { 0 }; struct options options;
struct fuse_args args = FUSE_ARGS_INIT(argc, argv); std::memset(&options, 0, sizeof(options));
struct fuse_chan *ch;
char *mountpoint = NULL; struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
int err = -1; struct fuse_chan *ch;
std::string mountPath; char *mountpoint = NULL;
unsigned format; int err = -1;
std::string mountPath;
unsigned format = 0;
int foreground = false; int foreground = false;
int multithread = false; int multithread = false;

View File

@ -1,14 +1,17 @@
#ifdef __APPLE__
#define __FreeBSD__ 10 #define __FreeBSD__ 10
#define __DARWIN_64_BIT_INO_T 1 #define __DARWIN_64_BIT_INO_T 1
#define _FILE_OFFSET_BITS 64 #endif
#define _FILE_OFFSET_BITS 64
#define FUSE_USE_VERSION 27 #define FUSE_USE_VERSION 27
#include <string> #include <string>
#include <vector> #include <vector>
#include <cerrno> #include <cerrno>
#include <cstdio> #include <cstdio>
#include <cstring>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
@ -45,6 +48,10 @@
#define DEBUGNAME() \ #define DEBUGNAME() \
if (0) { std::fprintf(stderr, "%s\n", __func__); } if (0) { std::fprintf(stderr, "%s\n", __func__); }
// linux doesn't have ENOATTR.
#ifndef ENOATTR
#define ENOATTR ENOENT
#endif
using namespace Pascal; using namespace Pascal;