diff options
author | 2014-05-13 06:53:13 +0000 | |
---|---|---|
committer | 2014-05-13 06:53:13 +0000 | |
commit | fcde0ea6d17fd0b5b0850c3031093d87a29b46bb (patch) | |
tree | 91aa1097f25db34abfb6dfc7ed517b58a3e9a55b /sys-fs/shake/files | |
parent | Fix patch file as per Bug #507932 (diff) | |
download | gentoo-2-fcde0ea6d17fd0b5b0850c3031093d87a29b46bb.tar.gz gentoo-2-fcde0ea6d17fd0b5b0850c3031093d87a29b46bb.tar.bz2 gentoo-2-fcde0ea6d17fd0b5b0850c3031093d87a29b46bb.zip |
Fix compilation with uclibc, patch by René Rhéaume <rene.rheaume@gmail.com> in bug #509888
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key C74525F2)
Diffstat (limited to 'sys-fs/shake/files')
-rw-r--r-- | sys-fs/shake/files/shake-0.999-uclibc.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sys-fs/shake/files/shake-0.999-uclibc.patch b/sys-fs/shake/files/shake-0.999-uclibc.patch new file mode 100644 index 000000000000..2c54df0b552c --- /dev/null +++ b/sys-fs/shake/files/shake-0.999-uclibc.patch @@ -0,0 +1,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. + */ |