tag 434015 patch thanks Lucas Nussbaum <[EMAIL PROTECTED]> (21/07/2007): > if gcc -DHAVE_CONFIG_H -I. -I. -I.. -O2 -g -Wall -MT utimens.o -MD -MP > -MF ".deps/utimens.Tpo" -c -o utimens.o utimens.c; \ > then mv -f ".deps/utimens.Tpo" ".deps/utimens.Po"; else rm -f > ".deps/utimens.Tpo"; exit 1; fi > In file included from ./sys/stat.h:27, > from ./fcntl.h:26, > from utimens.c:28: > ///usr/include/sys/stat.h:370: error: conflicting types for 'futimens' > utimens.h:2: error: previous declaration of 'futimens' was here > utimens.c: In function 'utimens': > utimens.c:169: warning: passing argument 2 of 'futimens' from incompatible > pointer type > utimens.c:169: error: too many arguments to function 'futimens'
Hi, please find attached a patch, based on what I read from Mathias Brodala in #433394. The compilation is OK, although I didn't run the full testsuite. Cheers, -- Cyril Brulebois
--- tar-1.16.1/lib/utimens.c 2006-09-27 08:06:57.000000000 +0000
+++ tar-1.16.1/lib/utimens.c 2007-07-23 00:23:54.000000000 +0000
@@ -73,7 +73,7 @@
Return 0 on success, -1 (setting errno) on failure. */
int
-futimens (int fd ATTRIBUTE_UNUSED,
+cu_futimens (int fd ATTRIBUTE_UNUSED,
char const *file, struct timespec const timespec[2])
{
/* There's currently no interface to set file timestamps with
@@ -166,5 +166,5 @@
int
utimens (char const *file, struct timespec const timespec[2])
{
- return futimens (-1, file, timespec);
+ return cu_futimens (-1, file, timespec);
}
--- tar-1.16.1/lib/utimens.h 2004-11-23 20:59:50.000000000 +0000
+++ tar-1.16.1/lib/utimens.h 2007-07-23 00:23:54.000000000 +0000
@@ -1,3 +1,3 @@
#include "timespec.h"
-int futimens (int, char const *, struct timespec const [2]);
+int cu_futimens (int, char const *, struct timespec const [2]);
int utimens (char const *, struct timespec const [2]);
--- tar-1.16.1/src/misc.c 2006-07-03 09:17:21.000000000 +0000
+++ tar-1.16.1/src/misc.c 2007-07-23 00:23:54.000000000 +0000
@@ -518,7 +518,7 @@
}
#endif
- return futimens (fd, file, timespec);
+ return cu_futimens (fd, file, timespec);
}
/* A description of a working directory. */
pgpgMjuxKFXmg.pgp
Description: PGP signature

