pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/kyua-cli tv_sec isn't necessarily time_t. Fixes ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5c5c0ffec5ee
branches:  trunk
changeset: 604717:5c5c0ffec5ee
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sat Jun 02 20:06:30 2012 +0000

description:
tv_sec isn't necessarily time_t. Fixes netbsd-5 build.

diffstat:

 devel/kyua-cli/distinfo                         |   3 ++-
 devel/kyua-cli/patches/patch-utils_datetime_cpp |  17 +++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r 934b3c8bbdbe -r 5c5c0ffec5ee devel/kyua-cli/distinfo
--- a/devel/kyua-cli/distinfo   Sat Jun 02 20:00:49 2012 +0000
+++ b/devel/kyua-cli/distinfo   Sat Jun 02 20:06:30 2012 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.5 2012/05/24 16:47:11 marino Exp $
+$NetBSD: distinfo,v 1.6 2012/06/02 20:06:30 dholland Exp $
 
 SHA1 (kyua-cli-0.3.tar.gz) = 445f054c739a8786439b8debfb6fb48df13349f9
 RMD160 (kyua-cli-0.3.tar.gz) = 214b6b947f947d7f5a42894278dcf909ccefe14d
 Size (kyua-cli-0.3.tar.gz) = 563041 bytes
+SHA1 (patch-utils_datetime_cpp) = 034d80169762d23a63fa04bc91f9a7b6e808d06f
 SHA1 (patch-utils_process_children.cpp) = 3ae9842ba2869693fc98458b9e18c14f06d2b265
 SHA1 (patch-utils_process_systembuf_test.cpp) = 8c7610cdb93145d1ec1eb36acb68749377059060
diff -r 934b3c8bbdbe -r 5c5c0ffec5ee devel/kyua-cli/patches/patch-utils_datetime_cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/kyua-cli/patches/patch-utils_datetime_cpp   Sat Jun 02 20:06:30 2012 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-utils_datetime_cpp,v 1.1 2012/06/02 20:06:30 dholland Exp $
+
+tv_sec isn't necessarily time_t.
+
+--- utils/datetime.cpp~        2012-02-13 23:06:33.000000000 +0000
++++ utils/datetime.cpp
+@@ -273,7 +273,9 @@ std::string
+ datetime::timestamp::strftime(const std::string& format) const
+ {
+     ::tm timedata;
+-    if (::gmtime_r(&_pimpl->data.tv_sec, &timedata) == NULL)
++    ::time_t tmp;
++    tmp = _pimpl->data.tv_sec;
++    if (::gmtime_r(&tmp, &timedata) == NULL)
+         UNREACHABLE_MSG("gmtime_r(3) did not accept the value returned by "
+                         "gettimeofday(2)");
+ 



Home | Main Index | Thread Index | Old Index