Hi all tar dudes,

Solaris' C compiler choked on xheader.c in tar-1.16.1:

  "xheader.c", line 1097: operands have incompatible types:
           struct timespec {long tv_sec, long tv_nsec} ":" const struct 
timespec {long tv_sec, long tv_nsec}
  cc: acomp failed for xheader.c

The following patch fixed the issue for me:

diff -ru src-1.16.1/src/xheader.c src-1.16.1-local/src/xheader.c
--- src-1.16.1/src/xheader.c    2006-12-05 08:37:59.000000000 +0100
+++ src-1.16.1-local/src/xheader.c      2006-12-11 14:18:55.000000000 +0100
@@ -1094,7 +1094,7 @@
 mtime_coder (struct tar_stat_info const *st, char const *keyword,
             struct xheader *xhdr, void const *data)
 {
-  const struct timespec mtime = data ? *(struct timespec *) data : st->mtime;
+  const struct timespec mtime = data ? *(const struct timespec *) data : 
st->mtime;
   code_time (mtime, keyword, xhdr);
 }
 

PS. Please CC me, since I'm not on the list.

Cheers,
-- 
Trond H. Amundsen <[EMAIL PROTECTED]>
Center for Information Technology Services, University of Oslo


Reply via email to