summaryrefslogtreecommitdiffstats
path: root/src/ctx.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-11-17 16:02:57 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-11-17 16:02:57 -0500
commitda02defb91c3a1bda0ea7e653d81f997f1c8884a (patch)
tree2b58212b064989b01c90d7d78fa00cedc9e4bec2 /src/ctx.c
parent3604eeddb8a317c0745e92680d0405c645fbe247 (diff)
downloadbfs-da02defb91c3a1bda0ea7e653d81f997f1c8884a.tar.xz
expr: Don't use reftime for -ls
reftime is part of a different union than the print actions are supposed to use.
Diffstat (limited to 'src/ctx.c')
-rw-r--r--src/ctx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ctx.c b/src/ctx.c
index b9d15bb..0403299 100644
--- a/src/ctx.c
+++ b/src/ctx.c
@@ -23,6 +23,7 @@
#include "pwcache.h"
#include "stat.h"
#include "trie.h"
+#include "xtime.h"
#include <assert.h>
#include <errno.h>
#include <limits.h>
@@ -109,6 +110,10 @@ struct bfs_ctx *bfs_ctx_new(void) {
goto fail;
}
+ if (xgettime(&ctx->now) != 0) {
+ goto fail;
+ }
+
return ctx;
fail: