Mercurial > hg > orthanc-databases
diff Framework/PostgreSQL/PostgreSQLIncludes.h @ 177:02ad3ea95fca
fix build on ubuntu 16.04
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 12 Dec 2020 19:45:47 +0100 |
parents | 0246923d4df9 |
children | 3236894320d6 |
line wrap: on
line diff
--- a/Framework/PostgreSQL/PostgreSQLIncludes.h Sat Dec 12 17:49:07 2020 +0100 +++ b/Framework/PostgreSQL/PostgreSQLIncludes.h Sat Dec 12 19:45:47 2020 +0100 @@ -28,6 +28,13 @@ #include <cmath> #include <Enumerations.h> +// Get "ntohl()" defined +#if defined(_WIN32) +# include <winsock.h> +#else +# include <arpa/inet.h> +#endif + // PostgreSQL includes #include <pg_config.h> @@ -35,5 +42,12 @@ # error PG_VERSION_NUM is not defined #endif +#if PG_VERSION_NUM >= 110000 +# include <catalog/pg_type_d.h> +#else +# include <postgres.h> +# undef LOG // This one comes from <postgres.h>, and conflicts with <Core/Logging.h> +# include <catalog/pg_type.h> +#endif + #include <libpq-fe.h> -#include <catalog/pg_type_d.h>