commit 59c17bb0ccccf65099c539197b0b8ac2853cb780 Author: Daniel Guzman Date: Fri May 2 02:42:02 2014 +0000 [PATCH] Fix ar.c to use FUTIMES macro Seems like upstream made a check for FUTIMES (elfutils-0.158-portability.patch) and added it to strip.c, but ar.c doesn't have it. Add it there too. Signed-off-by: Daniel Guzman --- src/ar.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ar.c b/src/ar.c index 512d114..b0753de 100644 --- a/src/ar.c +++ b/src/ar.c @@ -49,6 +49,11 @@ #include "arlib.h" +#ifdef HAVE_FUTIMES +# define FUTIMES(fd, fname, tvp) futimes (fd, tvp) +#else +# define FUTIMES(fd, fname, tvp) utimes (fname, tvp) +#endif /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); @@ -693,7 +698,7 @@ 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)) + if (unlikely (FUTIMES (xfd, arhdr->ar_name, tv) != 0)) { error (0, errno, gettext ("cannot change modification time of %s"),