Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 350484 Details for
Bug 470884
dev-libs/elfutils: build fails on uclibc
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fall back on utimes if futimes is not available
0005-Fall-back-on-utimes-if-futimes-is-not-available.patch (text/plain), 2.38 KB, created by
Anthony Basile
on 2013-06-09 01:34:41 UTC
(
hide
)
Description:
Fall back on utimes if futimes is not available
Filename:
MIME Type:
Creator:
Anthony Basile
Created:
2013-06-09 01:34:41 UTC
Size:
2.38 KB
patch
obsolete
>From 7f9a782c210d5a07bb9c73a54d389554cf5d4d70 Mon Sep 17 00:00:00 2001 >From: "Anthony G. Basile" <blueness@gentoo.org> >Date: Sat, 8 Jun 2013 21:04:16 -0400 >Subject: [PATCH 5/6] Fall back on utimes if futimes is not available > >We check if futimes is provided, and if it is not, we fall back >on utimes which is POSIX. > >Signed-off-by: Anthony G. Basile <blueness@gentoo.org> >--- > configure.ac | 3 +++ > src/ar.c | 8 +++++++- > src/strip.c | 18 ++++++++++++++++-- > 3 files changed, 26 insertions(+), 3 deletions(-) > >diff --git a/configure.ac b/configure.ac >index 20fd3bc..3304510 100644 >--- a/configure.ac >+++ b/configure.ac >@@ -268,6 +268,9 @@ AC_CHECK_FUNCS_ONCE([__mempcpy]) > dnl Chekf for obstack_printf > AC_CHECK_FUNCS_ONCE([obstack_printf]) > >+dnl Check for futimes >+AC_CHECK_FUNC([futimes]) >+ > dnl The directories with content. > > dnl Documentation. >diff --git a/src/ar.c b/src/ar.c >index f6d5823..f31329d 100644 >--- a/src/ar.c >+++ b/src/ar.c >@@ -693,7 +693,13 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc, > tv[1].tv_sec = arhdr->ar_date; > tv[1].tv_usec = 0; > >- if (unlikely (futimes (xfd, tv) != 0)) >+ int success; >+#ifdef HAVE_FUTIMES >+ success = futimes (xfd, tv); >+#else >+ success = utimes (arhdr->ar_name, tv); >+#endif >+ if (unlikely (success != 0)) > { > error (0, errno, > gettext ("cannot change modification time of %s"), >diff --git a/src/strip.c b/src/strip.c >index c4c1f35..5180d75 100644 >--- a/src/strip.c >+++ b/src/strip.c >@@ -2061,10 +2061,17 @@ while computing checksum for debug information")); > close (debug_fd); > } > >+ int success; >+#ifdef HAVE_FUTIMES >+ success = futimes (fd, tvp); >+#else >+ success = utimes (fname, tvp); >+#endif >+ > /* If requested, preserve the timestamp. */ > if (tvp != NULL) > { >- if (futimes (fd, tvp) != 0) >+ if (success != 0) > { > error (0, errno, gettext ("\ > cannot set access and modification date of '%s'"), >@@ -2119,9 +2126,16 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname, > INTERNAL_ERROR (fname); > } > >+ int success; >+#ifdef HAVE_FUTIMES >+ success = futimes (fd, tvp); >+#else >+ success = utimes (fname, tvp); >+#endif >+ > if (tvp != NULL) > { >- if (unlikely (futimes (fd, tvp) != 0)) >+ if (unlikely (success != 0)) > { > error (0, errno, gettext ("\ > cannot set access and modification date of '%s'"), fname); >-- >1.7.8.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 470884
:
348828
|
348830
|
348832
|
348908
|
349604
|
349608
|
350476
|
350478
|
350480
|
350482
| 350484 |
350486
|
376194
|
376196
|
376198
|
459426
|
459428
|
459430
|
459432
|
459434