summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2012-06-02 20:06:30 +0000
committerdholland <dholland@pkgsrc.org>2012-06-02 20:06:30 +0000
commita23176d8885a83ed3fb643727b7c74ab2f3acd55 (patch)
treeebc5706c0e1fed56025a9d93fa695bc9f89af2f6
parentb1f630a956329dd8db714708067c866d05a3b7fd (diff)
downloadpkgsrc-a23176d8885a83ed3fb643727b7c74ab2f3acd55.tar.gz
tv_sec isn't necessarily time_t. Fixes netbsd-5 build.
-rw-r--r--devel/kyua-cli/distinfo3
-rw-r--r--devel/kyua-cli/patches/patch-utils_datetime_cpp17
2 files changed, 19 insertions, 1 deletions
diff --git a/devel/kyua-cli/distinfo b/devel/kyua-cli/distinfo
index 8b5cec294ae..96dc132e2cf 100644
--- a/devel/kyua-cli/distinfo
+++ b/devel/kyua-cli/distinfo
@@ -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 --git a/devel/kyua-cli/patches/patch-utils_datetime_cpp b/devel/kyua-cli/patches/patch-utils_datetime_cpp
new file mode 100644
index 00000000000..02592c46aef
--- /dev/null
+++ b/devel/kyua-cli/patches/patch-utils_datetime_cpp
@@ -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)");
+