Fix handling of XATTR_{CREATE,REPLACE} once and for all.
authorDerrik Pates <demon@now.ai>
Tue, 2 Aug 2011 19:26:18 +0000 (13:26 -0600)
committerDerrik Pates <demon@now.ai>
Tue, 2 Aug 2011 19:26:18 +0000 (13:26 -0600)
Okay, seems I missed a prior change that made the XATTR_CREATE and
XATTR_REPLACE functions not included when __FreeBSD__ is defined (which
also includes OS X). Also, the macros that define the symbols when
FreeBSD or NetBSD is used instead of including <sys/xattr.h> didn't
account correctly for OS X's __FreeBSD__ having a value of 10. This
corrects that.

Fuse.xs

diff --git a/Fuse.xs b/Fuse.xs
index 31d6d2b..8d609fa 100755 (executable)
--- a/Fuse.xs
+++ b/Fuse.xs
@@ -5,7 +5,7 @@
 
 #include <fuse.h>
 
-#if defined(__FreeBSD__) || defined(__NetBSD__)
+#if (defined(__FreeBSD__) && __FreeBSD__ < 10) || defined(__NetBSD__)
 # define XATTR_CREATE 1
 # define XATTR_REPLACE 2
 #else
@@ -1617,7 +1617,6 @@ fuse_version()
        OUTPUT:
        RETVAL
 
-#ifndef __FreeBSD__
 SV *
 XATTR_CREATE()
        CODE:
@@ -1632,8 +1631,6 @@ XATTR_REPLACE()
        OUTPUT:
        RETVAL
 
-#endif
-
 void
 perl_fuse_main(...)
        PREINIT: