flow-tools (1:0.68-12) 06_time_t

Summary

 lib/ftfile.c |    8 ++++----
 lib/ftlib.h  |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

    
download this patch

Patch contents

#! /bin/sh -e
## 06_time_t done by Kurt Roeckx <kurt@roeckx.be>
## DP: Fixes directory creation problem on amd64


if [ $# -lt 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
       -patch) patch -f --no-backup-if-mismatch -p1 < $0;;

       -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;

        *)
                echo >&2 \
                  "`basename $0`: script expects -patch|-unpatch as argument"
                exit 1;;
esac

exit 0


@DPATCH@
--- flow-tools-0.68/lib/ftfile.c.old	2005-08-06 16:01:18.228015904 +0200
+++ flow-tools-0.68/lib/ftfile.c	2005-08-06 16:04:55.087048320 +0200
@@ -410,7 +410,7 @@
  * 
  */
 void ftfile_pathname(char *buf, int bsize, int nest, struct ftver ftv,
- int done, u_int32 ftime)
+ int done, time_t ftime)
 {
   struct tm *tm;
   char *prefix, dbuf[64];
@@ -418,7 +418,7 @@
   char gmt_sign;
   int tm_gmtoff;
   
-  if (!(tm = localtime ((time_t*)&ftime))) {
+  if (!(tm = localtime (&ftime))) {
     snprintf(buf, bsize, ".");
   }
 
@@ -499,7 +499,7 @@
  * returns -1 on error
  * 
  */
-int ftfile_mkpath(u_int32 ftime, int nest)
+int ftfile_mkpath(time_t ftime, int nest)
 {
   struct tm *tm;
   char buf[32];
@@ -512,7 +512,7 @@
   if ((nest > 3) || (nest < -3))
     return -1;
 
-  if (!(tm = localtime ((time_t*)&ftime)))
+  if (!(tm = localtime (&ftime)))
     return -1;
 
   if (nest == -1)
--- flow-tools-0.68/lib/ftlib.h.old	2005-08-06 16:06:19.836164496 +0200
+++ flow-tools-0.68/lib/ftlib.h	2005-08-06 16:05:47.261116656 +0200
@@ -2710,9 +2710,9 @@
 int ftfile_dump(struct ftfile_entries *fte);
 struct ftfile_entry *ftfile_entry_new(int len);
 void ftfile_entry_free(struct ftfile_entry *entry);
-int ftfile_mkpath(u_int32 ftime, int nest);
+int ftfile_mkpath(time_t ftime, int nest);
 void ftfile_pathname(char *buf, int bsize, int nest, struct ftver ftv,
- int done, u_int32 ftime);
+ int done, time_t ftime);