void-packages/srcpkgs/openntpd/patches/fix-time_t-overflow.patch

13 lines
335 B
Diff

--- a/src/constraint.c
+++ b/src/constraint.c
@@ -842,7 +842,7 @@ constraint_update(void)
/* calculate median */
i = cnt / 2;
if (cnt % 2 == 0)
- conf->constraint_median = (values[i - 1] + values[i]) / 2;
+ conf->constraint_median = ((long long)values[i - 1] + values[i]) / 2;
else
conf->constraint_median = values[i];