mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-23 20:35:02 +02:00
On Windows, the `winerror.h` header defines `WAIT_TIMEOUT` as a macro. This introduces a fragile dependency on header inclusion order: if Windows headers happen to be included before using `WAIT_TIMEOUT`, the preprocessor expands it into a numeric literal, causing syntax errors. Rename the variable to `TEST_WAIT_TIMEOUT` to remove this fragility and avoid the collision entirely. -BEGIN VERIFY SCRIPT- sed -i 's/\<WAIT_TIMEOUT\>/TEST_WAIT_TIMEOUT/g' $(git grep -l 'WAIT_TIMEOUT' ./src/) -END VERIFY SCRIPT-