Upstream: https://gitlab.gnome.org/GNOME/gcr/-/issues/45
diff --git a/egg/egg-asn1x.c b/egg/egg-asn1x.c
index b7d9d11..16caa6b 100644
--- a/egg/egg-asn1x.c
+++ b/egg/egg-asn1x.c
@@ -2213,7 +2213,7 @@ anode_read_time (GNode *node,
 		return anode_failure (node, "invalid time content");
 
 	/* In order to work with 32 bit time_t. */
-	if (sizeof (time_t) <= 4 && when->tm_year >= 138) {
+	if ((sizeof (time_t) <= 4 || sizeof (long) <= 4) && when->tm_year >= 138) {
 		*value = (time_t)2145914603;  /* 2037-12-31 23:23:23 */
 
 	/* Convert to seconds since epoch */
