From 2da25b18739c95384d236c783c188526e7f5f641 Mon Sep 17 00:00:00 2001
From: John Naylor <john.naylor@postgresql.org>
Date: Thu, 13 Feb 2025 15:40:02 +0700
Subject: [PATCH v5 7/8] Fix 32-bit build

---
 src/port/pg_crc32c_sse42.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/port/pg_crc32c_sse42.c b/src/port/pg_crc32c_sse42.c
index 0fb9c16dfc..fe7e8165ec 100644
--- a/src/port/pg_crc32c_sse42.c
+++ b/src/port/pg_crc32c_sse42.c
@@ -113,6 +113,7 @@ pg_comp_crc32c_sse42(pg_crc32c crc, const void *data, size_t length)
 	size_t		len = length;
 	const unsigned char *buf = data;
 
+#if SIZEOF_VOID_P >= 8
 	if (len >= PCLMUL_THRESHOLD)
 	{
 		/* First vector chunk. */
@@ -160,6 +161,7 @@ pg_comp_crc32c_sse42(pg_crc32c crc, const void *data, size_t length)
 		crc0 = _mm_crc32_u64(0, _mm_extract_epi64(x0, 0));
 		crc0 = _mm_crc32_u64(crc0, _mm_extract_epi64(x0, 1));
 	}
+#endif /* SIZEOF_VOID_P */
 
 	return pg_comp_crc32c_sse42_tail(crc0, buf, len);
 }
-- 
2.48.1

