--- calcurse-4.8.1.orig/src/calcurse.h
+++ calcurse-4.8.1/src/calcurse.h
@@ -1272,8 +1272,8 @@ int asprintf(char **, const char *, ...)
 int starts_with(const char *, const char *);
 int starts_with_ci(const char *, const char *);
 int hash_matches(const char *, const char *);
-long overflow_add(long, long, long *);
-long overflow_mul(long, long, long *);
+time_t overflow_add(time_t, time_t, time_t *);
+time_t overflow_mul(time_t, time_t, time_t *);
 time_t next_wday(time_t, int);
 int wday_per_year(int, int);
 int wday_per_month(int, int, int);
--- calcurse-4.8.1.orig/src/utils.c
+++ calcurse-4.8.1/src/utils.c
@@ -1099,7 +1099,7 @@ int parse_date_increment(const char *str
 	incr += in;
 	if (start) {
 		/* wanted: start = start + incr * DAYINSEC */
-		long p;
+		time_t p;
 		if (overflow_mul(incr, DAYINSEC, &p))
 			return 0;
 		if (overflow_add(start, p, &start))
@@ -1261,7 +1261,7 @@ int parse_duration(const char *string, u
 	if (start) {
 		/* wanted: end = start + dur * MININSEC */
 		time_t end;
-		long p, s;
+		time_t p, s;
 		if (overflow_mul(dur, MININSEC, &p))
 			return 0;
 		if (overflow_add(start, p, &s))
@@ -2043,7 +2043,7 @@ int hash_matches(const char *pattern, co
 /*
  * Overflow check for addition with positive second term.
  */
-long overflow_add(long x, long y, long *z)
+time_t overflow_add(time_t x, time_t y, time_t *z)
 {
 	if (!YEAR1902_2037)
 		goto exit;
@@ -2060,7 +2060,7 @@ long overflow_add(long x, long y, long *
 /*
  * Overflow check for multiplication with positive terms.
  */
-long overflow_mul(long x, long y, long *z)
+time_t overflow_mul(time_t x, time_t y, time_t *z)
 {
 	if (!YEAR1902_2037)
 		goto exit;
