bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] xheader.c: wrong cast


From: Trond Hasle Amundsen
Subject: [Bug-tar] xheader.c: wrong cast
Date: Mon, 11 Dec 2006 14:27:09 +0100
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

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 <address@hidden>
Center for Information Technology Services, University of Oslo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]