On Thu, 29 Jun 2023 at 10:39, Jonathan Wakely wrote: > > On Thu, 29 Jun 2023 at 10:27, Alexey Lapshin > wrote: > > > > On Thu, 2023-06-29 at 10:23 +0100, Jonathan Wakely wrote: > > > That macro isn't even defined until later in the file, so would never > > > be defined at this point. > > > > Was a simplified example. > > > > > > Why do you still need to have some mutexes or whatever in case TZDB_DISABLED? > > Because there is still a global object that needs to be lazily > constructed, and multiple threads can try to access it concurrently. The attached patch should work for your target.