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
52
53
54
|
$NetBSD: patch-ag,v 1.3 2005/01/09 22:52:14 recht Exp $
--- src/extract.c.orig Mon Sep 13 10:12:04 2004
+++ src/extract.c Sun Jan 9 18:26:07 2005
@@ -195,7 +195,11 @@
mode = cur_info->st_mode ^ invert_permissions;
}
+#if (defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2))
+ if (lchmod (file_name, mode) != 0)
+#else
if (chmod (file_name, mode) != 0)
+#endif
chmod_error_details (file_name, mode);
}
@@ -235,7 +239,12 @@
{
struct utimbuf utimbuf;
+#if !(defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2))
if (typeflag != SYMTYPE)
+#else
+ struct timeval tv[2];
+#endif
+
{
/* We do the utime before the chmod because some versions of utime are
broken and trash the modes of the file. */
@@ -248,6 +257,7 @@
/* FIXME: incremental_option should set ctime too, but how? */
+#if !(defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2))
if (incremental_option)
utimbuf.actime = stat_info->st_atime;
else
@@ -256,6 +266,16 @@
utimbuf.modtime = stat_info->st_mtime;
if (utime (file_name, &utimbuf) < 0)
+#else
+ if (incremental_option)
+ tv[0].tv_sec = stat_info->st_atime;
+ else
+ tv[0].tv_sec = start_time;
+ tv[0].tv_usec = 0;
+ tv[1].tv_sec = stat_info->st_mtime;
+ tv[1].tv_usec = 0;
+ if (lutimes (file_name, tv) < 0)
+#endif
utime_error (file_name);
else
{
|