#include "perl.h"
#include "XSUB.h"
-#include <sys/xattr.h>
#include <fuse.h>
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+# define XATTR_CREATE 1
+# define XATTR_REPLACE 2
+#else
+# include <sys/xattr.h>
+#endif
+
/* Determine if threads support should be included */
#ifdef USE_ITHREADS
# ifdef I_PTHREAD
OUTPUT:
RETVAL
+#ifndef __FreeBSD__
SV *
XATTR_CREATE()
CODE:
OUTPUT:
RETVAL
+#endif
+
void
perl_fuse_main(...)
PREINIT:
fuse_opt_free_args(&args);
croak("out of memory\n");
}
- if (mountopts &&
- fuse_opt_add_arg(&args, "-o") == -1 ||
+ if (mountopts && strcmp("", mountopts) &&
+ (fuse_opt_add_arg(&args, "-o") == -1 ||
fuse_opt_add_arg(&args, mountopts) == -1)) {
fuse_opt_free_args(&args);
croak("out of memory\n");