aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9pfuse
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2009-04-30 08:01:33 -0700
committerRuss Cox <rsc@swtch.com>2009-04-30 08:01:33 -0700
commitd439750308e864a61ba67614ea9bb37343441aca (patch)
tree26ea383075ff4b77b13967dd50bf0f08a6ec4c19 /src/cmd/9pfuse
parent9ea7f9d82f3b929853016ccd12dfd5c044e95d07 (diff)
parent9ea7f9d82f3b929853016ccd12dfd5c044e95d07 (diff)
downloadplan9port-d439750308e864a61ba67614ea9bb37343441aca.tar.gz
plan9port-d439750308e864a61ba67614ea9bb37343441aca.tar.bz2
plan9port-d439750308e864a61ba67614ea9bb37343441aca.zip
merge
Diffstat (limited to 'src/cmd/9pfuse')
-rw-r--r--src/cmd/9pfuse/fuse_kernel.h10
-rw-r--r--src/cmd/9pfuse/mkfile1
-rwxr-xr-xsrc/cmd/9pfuse/osxvers7
3 files changed, 16 insertions, 2 deletions
diff --git a/src/cmd/9pfuse/fuse_kernel.h b/src/cmd/9pfuse/fuse_kernel.h
index 07bd91d9..e529b8de 100644
--- a/src/cmd/9pfuse/fuse_kernel.h
+++ b/src/cmd/9pfuse/fuse_kernel.h
@@ -1,3 +1,6 @@
+
+
+
/*
This file defines the kernel interface of FUSE
Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
@@ -61,13 +64,13 @@ struct fuse_attr {
__u64 atime;
__u64 mtime;
__u64 ctime;
-#if (__FreeBSD__ >= 10)
+#if (__FreeBSD__ >= 10 && __OSX_VERSION__ >= 100500)
__u64 crtime;
#endif /* __FreeBSD__ >= 10 */
__u32 atimensec;
__u32 mtimensec;
__u32 ctimensec;
-#if (__FreeBSD__ >= 10)
+#if (__FreeBSD__ >= 10 && __OSX_VERSION__ >= 100500)
__u32 crtimensec;
#endif /* __FreeBSD__ >= 10 */
__u32 mode;
@@ -77,6 +80,9 @@ struct fuse_attr {
__u32 rdev;
#if (__FreeBSD__ >= 10)
__u32 flags; /* file flags; see chflags(2) */
+#if __OSX_VERSION__ < 100500
+ __u32 padding;
+#endif /* __OSX_VERSION__ < 100500 */
#endif /* __FreeBSD__ >= 10 */
};
diff --git a/src/cmd/9pfuse/mkfile b/src/cmd/9pfuse/mkfile
index d5f700ae..d8d63b41 100644
--- a/src/cmd/9pfuse/mkfile
+++ b/src/cmd/9pfuse/mkfile
@@ -1,4 +1,5 @@
<$PLAN9/src/mkhdr
+<|osxvers
TARG=9pfuse
diff --git a/src/cmd/9pfuse/osxvers b/src/cmd/9pfuse/osxvers
new file mode 100755
index 00000000..4af44da2
--- /dev/null
+++ b/src/cmd/9pfuse/osxvers
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+u=`uname`
+case "$u" in
+Darwin)
+ sw_vers | awk '$1 == "ProductVersion:" {print $2}' | awk -F. '{printf("CFLAGS=$CFLAGS -DOSX_VERSION=%d%02d%02d\n", $1, $2, $3)}'
+esac