]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix USE_SLICING_BY_8_CRC32C builds on x86
authorJohn Naylor <john.naylor@postgresql.org>
Wed, 25 Feb 2026 01:44:59 +0000 (08:44 +0700)
committerJohn Naylor <john.naylor@postgresql.org>
Wed, 25 Feb 2026 01:44:59 +0000 (08:44 +0700)
A future commit will move the CRC function choosing logic to the
file where the hardware-specific functions are defined, but until
then add guards for builds without those functions. Oversight in
commit b9278871f.

Per buildfarm animal rhinoceros

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/4014992.1771963187@sss.pgh.pa.us

src/port/pg_cpu_x86.c

index 998a70ffa418d1bbf08003d35ea25d836e6d3f07..0c292c0223a76873d7bec43cc1072c66e333e4cc 100644 (file)
@@ -36,6 +36,8 @@
 
 #include "port/pg_crc32c.h"
 
+#ifndef USE_SLICING_BY_8_CRC32C
+
 /*
  * Does XGETBV say the ZMM registers are enabled?
  *
@@ -110,4 +112,6 @@ pg_comp_crc32c_choose(pg_crc32c crc, const void *data, size_t len)
 
 pg_crc32c      (*pg_comp_crc32c) (pg_crc32c crc, const void *data, size_t len) = pg_comp_crc32c_choose;
 
+#endif
+
 #endif                                                 /* defined(USE_SSE2) || defined(__i386__) */