1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
$NetBSD: patch-ae,v 1.1.1.1 2007/07/09 19:03:22 agc Exp $
--- fuse_int.c 2007/07/09 18:28:21 1.1
+++ fuse_int.c 2007/07/09 18:35:16
@@ -21,7 +21,11 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
+#ifdef __linux__
#include <asm/fcntl.h>
+#else
+#include <fcntl.h>
+#endif
#include <utime.h>
#include <stdlib.h>
@@ -270,8 +274,13 @@
fp.unixprivs.uid,&stbuf->st_uid,
fp.unixprivs.gid,&stbuf->st_gid)) return -EIO;
+#ifdef __linux__
stbuf->st_ctim.tv_sec=fp.creation_date;
stbuf->st_mtim.tv_sec=fp.modification_date;
+#else
+ stbuf->st_ctime=fp.creation_date;
+ stbuf->st_mtime=fp.modification_date;
+#endif
if (resource==AFP_RESOURCE_TYPE_PARENT2) {
stbuf->st_mode |= S_IFDIR;
@@ -890,7 +899,10 @@
}
}
- if ((fi->flags & O_LARGEFILE) &&
+ if (
+#ifdef __linux__
+ (fi->flags & O_LARGEFILE) &&
+#endif
(volume->server->using_version->av_number<30)) {
switch(get_directory_entry(volume,fp->basename,dirid,
kFPParentDirIDBit|kFPNodeIDBit|
@@ -2039,7 +2051,7 @@
{
global_volume=vol;
-#if FUSE_VERSION < 26
+#if FUSE_USE_VERSION < 26
return fuse_main(fuseargc, fuseargv, &afp_oper);
#else
return fuse_main(fuseargc, fuseargv, &afp_oper,(void *) vol);
|