You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-fs/shake/files/shake-0.999-uclibc.patch

50 lines
1.2 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

--- 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.
*/