From f56db7ea76e3634257cd1df235aea5a6a7eef2fc Mon Sep 17 00:00:00 2001 From: Paolo Tosco Date: Thu, 10 Aug 2023 14:18:33 +0200 Subject: [PATCH] allow building the cartridge against PostgreSQL 16 (#6580) --- Code/PgSQL/rdkit/rdkit.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Code/PgSQL/rdkit/rdkit.h b/Code/PgSQL/rdkit/rdkit.h index a278884fa..2ff5ad42f 100644 --- a/Code/PgSQL/rdkit/rdkit.h +++ b/Code/PgSQL/rdkit/rdkit.h @@ -39,6 +39,14 @@ extern "C" { #endif #include +#ifdef PG_VERSION_NUM +#if PG_VERSION_NUM >= 160000 +#include +#ifndef Abs +#define Abs(x) ((x) >= 0 ? (x) : -(x)) +#endif +#endif +#endif typedef bytea Mol;