aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-01-23 16:36:23 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-01-23 16:36:27 +0100
commit5271c77f8356dc6de95fd6d08a415df3568eb7a1 (patch)
tree6a762bb05cc3c0a5a84d5077aec88aa3f5ac52d3
parenta8c1ea50c74fc2b9e34e18cac0b15399b89b9662 (diff)
parentb358bde020e2b9f6249fdbc500db6cb30f500f19 (diff)
downloadbitcoin-5271c77f8356dc6de95fd6d08a415df3568eb7a1.tar.xz
Merge bitcoin/bitcoin#26826: refactor: remove windows-only compat.h usage in randomenv
b358bde020e2b9f6249fdbc500db6cb30f500f19 randomenv: consolidate WIN32 #ifdefs (fanquake) fff80cd2488899a322f9e673930a00eb9ab5b165 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 b358bde020e2b9f6249fdbc500db6cb30f500f19. TheCharlatan: ACK b358bde020e2b9f6249fdbc500db6cb30f500f19 Tree-SHA512: d46dffe36a17ad0f9374a55e0ecaf2d60d0b473c8fc9ad6f3005142014c08a7c10bae4948856531abb443f5e0bd6062958fe574197e282dad22ae50134d71e5f
-rw-r--r--src/randomenv.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/randomenv.cpp b/src/randomenv.cpp
index 35d090c71d..3e4d5a587d 100644
--- a/src/randomenv.cpp
+++ b/src/randomenv.cpp
@@ -13,21 +13,21 @@
#include <compat/cpuid.h>
#include <crypto/sha512.h>
#include <support/cleanse.h>
-#include <util/time.h> // for GetTime()
-#ifdef WIN32
-#include <compat/compat.h>
-#endif
+#include <util/time.h>
#include <algorithm>
#include <atomic>
+#include <cstdint>
+#include <cstring>
#include <chrono>
#include <climits>
#include <thread>
#include <vector>
-#include <stdint.h>
-#include <string.h>
-#ifndef WIN32
+#ifdef WIN32
+#include <windows.h>
+#include <winreg.h>
+#else
#include <sys/types.h> // must go before a number of other headers
#include <fcntl.h>
#include <netinet/in.h>