Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 83246c4

Browse files
dura0okCommitfest Bot
authored and
Commitfest Bot
committed
Fix compilation on systems where <immintrin.h> is not available or inappropriate, such as older GCC versions or non-x86 platforms.
1 parent 9f76296 commit 83246c4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/include/storage/checksum_impl.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@
112112
#include <cpuid.h>
113113
#endif
114114

115+
#ifdef HAVE_XSAVE_INTRINSICS
115116
#include <immintrin.h>
117+
#endif
116118

117119
#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
118120
#include <intrin.h>
@@ -253,10 +255,6 @@ pg_checksum_block_##ISANAME(const PGChecksummablePage *page) \
253255
}
254256

255257
/* Declarations are always defined to make dynamic dispatch code simpler */
256-
257-
PG_DECLARE_CHECKSUM_ISA(default);
258-
PG_DECLARE_CHECKSUM_ISA(avx2);
259-
260258
PG_DEFINE_CHECKSUM_ISA(default);
261259
#ifdef USE_AVX2_WITH_RUNTIME_CHECK
262260
PG_DEFINE_CHECKSUM_ISA(avx2);

0 commit comments

Comments
 (0)