aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/savevm.c b/savevm.c
index 4d9f822f27..6fa7a5fe8e 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1897,7 +1897,8 @@ void do_savevm(Monitor *mon, const QDict *qdict)
ptm = localtime(&tb.time);
strftime(sn->name, sizeof(sn->name), "vm-%Y%m%d%H%M%S", ptm);
#else
- localtime_r(&tv.tv_sec, &tm);
+ /* cast below needed for OpenBSD where tv_sec is still 'long' */
+ localtime_r((const time_t *)&tv.tv_sec, &tm);
strftime(sn->name, sizeof(sn->name), "vm-%Y%m%d%H%M%S", &tm);
#endif
}