]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib: stop `time()` debug overrides at the end of source in altsvc, hsts
authorViktor Szakats <commit@vsz.me>
Fri, 11 Jul 2025 11:45:06 +0000 (13:45 +0200)
committerViktor Szakats <commit@vsz.me>
Sat, 12 Jul 2025 06:59:44 +0000 (08:59 +0200)
To avoid applying it to all other sources in unity mode.

This may have affected tests setting a custom time via `CURL_TIME`,
in unity builds: 446, 780, 781, 782, 783, 970, 972, 1654, 1660

Closes #17897

lib/altsvc.c
lib/hsts.c

index bd87af1c87d51f025d14e34770319ff287ca514f..2ccd22ef472b7b8a20b15547b297134e3ef41395 100644 (file)
@@ -665,4 +665,8 @@ bool Curl_altsvc_lookup(struct altsvcinfo *asi,
   return FALSE;
 }
 
+#if defined(DEBUGBUILD) || defined(UNITTESTS)
+#undef time
+#endif
+
 #endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_ALTSVC */
index cba218153a0cd2a9d5fcce897b3540fdfdbe603f..91f32276f95c5b17f3b8b0edc9aa63a93a19bb60 100644 (file)
@@ -580,4 +580,8 @@ void Curl_hsts_loadfiles(struct Curl_easy *data)
   }
 }
 
+#if defined(DEBUGBUILD) || defined(UNITTESTS)
+#undef time
+#endif
+
 #endif /* CURL_DISABLE_HTTP || CURL_DISABLE_HSTS */