voyageur 14/05/13 06:53:13 Added: shake-0.999-uclibc.patch Log: Fix compilation with uclibc, patch by René Rhéaume <[email protected]> in bug #509888 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key C74525F2)
Revision Changes Path 1.1 sys-fs/shake/files/shake-0.999-uclibc.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/shake/files/shake-0.999-uclibc.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/shake/files/shake-0.999-uclibc.patch?rev=1.1&content-type=text/plain Index: shake-0.999-uclibc.patch =================================================================== --- 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. */
