changeset 124:a981ef52bcf6

fix build with postgresql 11
author jodogne
date Fri, 08 Feb 2019 18:10:41 +0100
parents 121ab36c87bd
children b85d672afcb5 de1dbd841e2b
files Framework/PostgreSQL/PostgreSQLIncludes.h
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/PostgreSQL/PostgreSQLIncludes.h	Fri Feb 08 17:41:38 2019 +0100
+++ b/Framework/PostgreSQL/PostgreSQLIncludes.h	Fri Feb 08 18:10:41 2019 +0100
@@ -28,6 +28,15 @@
 #include <cmath>
 #include <Core/Enumerations.h>
 
+/**
+ * This include must be before including "c.h" from PostgreSQL,
+ * otherwise the function "static bool
+ * boost::date_time::special_values_parser<date_type,
+ * charT>::__builtin_expect()" from Boost clashes with macro
+ * "__builtin_expect()" used by PostgreSQL 11.
+ **/
+#include <boost/date_time/posix_time/posix_time.hpp>
+
 // PostgreSQL includes
 #include <pg_config.h>