openbsd-ports/sysutils/augeas/patches/patch-examples_dump_c
ajacoutot c3b8983b9d Fix augtool:/usr/lib/libreadline.so.4.0: undefined symbol 'tgetent' as
reported by Raf Czlonka.
While here use %lld to print time_t.
2018-11-01 08:39:04 +00:00

17 lines
550 B
Plaintext

$OpenBSD: patch-examples_dump_c,v 1.1 2018/11/01 08:39:04 ajacoutot Exp $
64bit time_t
Index: examples/dump.c
--- examples/dump.c.orig
+++ examples/dump.c
@@ -121,7 +121,7 @@ static void print_time_taken(const struct timeval *sta
const struct timeval *stop) {
time_t elapsed = (stop->tv_sec - start->tv_sec)*1000
+ (stop->tv_usec - start->tv_usec)/1000;
- fprintf(stderr, "time: %ld ms\n", elapsed);
+ fprintf(stderr, "time: %lld ms\n", elapsed);
}
int main(int argc, char **argv) {