From 0c2797f9cf14d3657fb04972b940db9048ebb090 Mon Sep 17 00:00:00 2001 From: Devrim Gunduz Date: Thu, 9 Jul 2026 13:38:12 +0300 Subject: [PATCH] PostgreSQL 19 fixes replace `bits8 *pa, *pb` with `uint8 *pa, *pb` in hamming(). PG19 dropped the `bits8` typedef (previously `typedef uint8 bits8;` in c.h) in favor of using `uint8` directly; VARBITS() now returns `uint8 *` instead of `bits8 *`. Under PG18 and earlier this compiled fine because `bits8` was a valid alias, but on PG19 the identifier is gone entirely, so the compiler treats `bits8 *pa, *pb;` as an expression rather than a declaration, producing "use of undeclared identifier 'bits8'" (clang) / "unknown type name 'bits8'" (gcc), plus the cascading "undeclared identifier pa/pb" and "assignment ... from incompatible pointer type 'uint8 *'" errors Hacked by Claude, tested by me. --- hamming.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hamming.c b/hamming.c index 862ed7f..a1c62b0 100644 --- a/hamming.c +++ b/hamming.c @@ -44,7 +44,7 @@ hamming(PG_FUNCTION_ARGS) { VarBit *a, *b; int alen, blen; - bits8 *pa, *pb; + uint8 *pa, *pb; int maxlen; float8 res = 0.0; int i;