Fri Oct 28 18:06:09 2022 UTC ()
databases/libzdb: fix one more test's time_t print issue on NetBSD.


(he)
diff -r1.8 -r1.9 pkgsrc/databases/libzdb/distinfo
diff -r0 -r1.1 pkgsrc/databases/libzdb/patches/patch-test_pool.c

cvs diff -r1.8 -r1.9 pkgsrc/databases/libzdb/distinfo (expand / switch to unified diff)

--- pkgsrc/databases/libzdb/distinfo 2022/10/28 17:59:47 1.8
+++ pkgsrc/databases/libzdb/distinfo 2022/10/28 18:06:09 1.9
@@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
1$NetBSD: distinfo,v 1.8 2022/10/28 17:59:47 he Exp $ 1$NetBSD: distinfo,v 1.9 2022/10/28 18:06:09 he Exp $
2 2
3BLAKE2s (libzdb-3.2.2.tar.gz) = 9df58f68d011a948e1de1a90c74665a89cd61d63ebe1b223adfc588e859d6401 3BLAKE2s (libzdb-3.2.2.tar.gz) = 9df58f68d011a948e1de1a90c74665a89cd61d63ebe1b223adfc588e859d6401
4SHA512 (libzdb-3.2.2.tar.gz) = 1e732f8785322e0369de16a8100c9467e96ad1ca4eee31e8bfc349f4f17d4cc237a691addc060a66e1b46bcfeb99c3aed07b1d5dbe20e70fde4ffbf35dbea2eb 4SHA512 (libzdb-3.2.2.tar.gz) = 1e732f8785322e0369de16a8100c9467e96ad1ca4eee31e8bfc349f4f17d4cc237a691addc060a66e1b46bcfeb99c3aed07b1d5dbe20e70fde4ffbf35dbea2eb
5Size (libzdb-3.2.2.tar.gz) = 752292 bytes 5Size (libzdb-3.2.2.tar.gz) = 752292 bytes
6SHA1 (patch-src_zdbpp.h) = c1dcdc7cea4ed55408107cb3e794ba38430ee4ae 6SHA1 (patch-src_zdbpp.h) = c1dcdc7cea4ed55408107cb3e794ba38430ee4ae
 7SHA1 (patch-test_pool.c) = c96b47dc723b7fb7bf5e02cd3cdec49cb66d3656
7SHA1 (patch-test_unit.c) = c7095217e6bf2fa04bb033ae8600fb04d85b4b69 8SHA1 (patch-test_unit.c) = c7095217e6bf2fa04bb033ae8600fb04d85b4b69

File Added: pkgsrc/databases/libzdb/patches/patch-test_pool.c
$NetBSD: patch-test_pool.c,v 1.1 2022/10/28 18:06:09 he Exp $

Fix handling of time_t on NetBSD.

--- test/pool.c.orig	2019-04-30 14:11:41.000000000 +0000
+++ test/pool.c
@@ -5,6 +5,7 @@
 #include <assert.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include <inttypes.h>
 
 #include "URL.h"
 #include "Thread.h"
@@ -684,7 +685,11 @@ static void testPool(const char *testURL
                         assert(timestampAsTm.tm_sec == 58);
                         assert(timestampAsTm.TM_GMTOFF == 0);
                         // Result
+#if defined(__NetBSD__)
+                        printf("\tDate: %s, Time: %s, DateTime: %s\n\tTimestamp as numeric: %" PRId64 ", Timestamp as string: %s\n",
+#else
                         printf("\tDate: %s, Time: %s, DateTime: %s\n\tTimestamp as numeric: %ld, Timestamp as string: %s\n",
+#endif
                                ResultSet_getString(r, 1),
                                ResultSet_getString(r, 2),
                                ResultSet_getString(r, 3),