]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10774 - [switch_pgsql] Fix build for PostgreSQL/libpq 10
authorItalo Rossi <italorossib@gmail.com>
Mon, 6 Nov 2017 13:35:36 +0000 (10:35 -0300)
committerItalo Rossi <italorossib@gmail.com>
Mon, 6 Nov 2017 13:35:36 +0000 (10:35 -0300)
src/switch_pgsql.c

index 79286242704785fbe1d2d7e49ecdf300f45cd9c6..f3411361fd2fc55e9298c36affd787486a5de6f9 100644 (file)
@@ -386,7 +386,7 @@ SWITCH_DECLARE(switch_pgsql_status_t) switch_pgsql_next_result_timed(switch_pgsq
                *result_out = res;
                res->status = PQresultStatus(res->result);
                switch(res->status) {
-#if POSTGRESQL_MAJOR_VERSION >= 9 && POSTGRESQL_MINOR_VERSION >= 2
+#if (POSTGRESQL_MAJOR_VERSION == 9 && POSTGRESQL_MINOR_VERSION >= 2) || POSTGRESQL_MAJOR_VERSION > 9
                case PGRES_SINGLE_TUPLE:
                        /* Added in PostgreSQL 9.2 */
 #endif
@@ -397,7 +397,7 @@ SWITCH_DECLARE(switch_pgsql_status_t) switch_pgsql_next_result_timed(switch_pgsq
                                res->cols = PQnfields(res->result);
                        }
                        break;
-#if POSTGRESQL_MAJOR_VERSION >= 9 && POSTGRESQL_MINOR_VERSION >= 1
+#if (POSTGRESQL_MAJOR_VERSION == 9 && POSTGRESQL_MINOR_VERSION >= 1) || POSTGRESQL_MAJOR_VERSION > 9
                case PGRES_COPY_BOTH:
                        /* Added in PostgreSQL 9.1 */
 #endif