]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix macro-redefinition warning introduced by aeb07c55f.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 1 Jul 2026 17:44:45 +0000 (13:44 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 1 Jul 2026 17:44:45 +0000 (13:44 -0400)
Some platforms provide a definition of unreachable() in standard C
headers, leading to a conflict with unreachable() in the new
timezone code.  It seems best for our purposes to conform to what
pg_unreachable() does, so #undef away the platform version.

Reported-by: Tristan Partin <tristan@partin.io>
Discussion: https://postgr.es/m/DJNDN9UQS9GP.11L4NJ1HHE1ZJ@partin.io

src/timezone/private.h

index 0d02e620b6f7b817c6d29e5c7b71934b621f865b..2a1a64d43c9f233144beb39707879b631beb79ff 100644 (file)
  */
 #define INITIALIZE(x)  ((x) = 0)
 
+/* Some platforms provide unreachable(), but let's rely on our own version */
+#undef unreachable
 #define unreachable() pg_unreachable()
 
 /*