summaryrefslogtreecommitdiff
path: root/sys-fs/shake/files/shake-0.999-uclibc.patch
blob: 2c54df0b552c3305045ad9542974002dfb16d68d (plain)
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
--- shake-fs-0.999-orig/executive.c
+++ shake-fs-0.999/executive.c
@@ -214,12 +214,21 @@ release (struct accused *a, struct law *
   assert (a->fd >= 0);
   /* Restores mtime */
   {
+#ifdef __UCLIBC__
+    struct timespec tv[2];
+    tv[0].tv_sec = a->atime;
+    tv[0].tv_nsec = 0;
+    tv[1].tv_sec = a->mtime;
+    tv[1].tv_nsec = 0;
+    futimens (a->fd, tv);
+#else
     struct timeval tv[2];
     tv[0].tv_sec = a->atime;
     tv[0].tv_usec = 0;
     tv[1].tv_sec = a->mtime;
     tv[1].tv_usec = 0;
     futimes (a->fd, tv);
+#endif
   }
   if (has_been_unlocked (a, l))
     error (0, 0, "%s: concurent accesses", a->name);
--- shake-fs-0.999-orig/linux.h
+++ shake-fs-0.999/linux.h
@@ -32,7 +32,6 @@
 /* Called once, perform OS-specific tasks.
  */
 int os_specific_setup (const char *tempfile);
-
 
 
 /* Get a write lock on the file.
@@ -54,12 +53,13 @@ int readlock_to_writelock (int fd);
 /* Return true if fd is locked, else false
  */
 bool is_locked (int fd);
-
 
 
+#ifndef __UCLIBC__
 /* Declares the glibc function
  */
 int futimes (int fd, const struct timeval tv[2]);
+#endif
 
 /* Set the shake_ptime field and ctime of the file to the actual date.
  */