Skip to content

Commit 5271c77

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#26826: refactor: remove windows-only compat.h usage in randomenv
b358bde randomenv: consolidate WIN32 #ifdefs (fanquake) fff80cd random: remove windows-only compat.h include in randomenv (fanquake) Pull request description: Similar to #26814. Having a windows-only include of compat.h is confusing, not-only because it's already included globally via util/time.h, but also because it's unclear why compat.h is included (neither of the required headers are included there). This change is related to removing the use of compat.h as a miscellaneous catch-all for unclear/platform specific includes. Somewhat prompted by IWYU-related discussion here: https://github.com/bitcoin/bitcoin/pull/26763/files#r1058861693. ACKs for top commit: hebasto: ACK b358bde. TheCharlatan: ACK b358bde Tree-SHA512: d46dffe36a17ad0f9374a55e0ecaf2d60d0b473c8fc9ad6f3005142014c08a7c10bae4948856531abb443f5e0bd6062958fe574197e282dad22ae50134d71e5f
2 parents a8c1ea5 + b358bde commit 5271c77

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/randomenv.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313
#include <compat/cpuid.h>
1414
#include <crypto/sha512.h>
1515
#include <support/cleanse.h>
16-
#include <util/time.h> // for GetTime()
17-
#ifdef WIN32
18-
#include <compat/compat.h>
19-
#endif
16+
#include <util/time.h>
2017

2118
#include <algorithm>
2219
#include <atomic>
20+
#include <cstdint>
21+
#include <cstring>
2322
#include <chrono>
2423
#include <climits>
2524
#include <thread>
2625
#include <vector>
2726

28-
#include <stdint.h>
29-
#include <string.h>
30-
#ifndef WIN32
27+
#ifdef WIN32
28+
#include <windows.h>
29+
#include <winreg.h>
30+
#else
3131
#include <sys/types.h> // must go before a number of other headers
3232
#include <fcntl.h>
3333
#include <netinet/in.h>

0 commit comments

Comments
 (0)