lib: stop time() debug overrides at the end of source in altsvc, hsts

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
This commit is contained in:
Viktor Szakats 2025-07-11 13:45:06 +02:00
parent 368ba4e13f
commit 886389dc01
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
2 changed files with 8 additions and 0 deletions

View 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 */