From 17a0f98920a143baf40a2eb01994cd95ce6fcbc9 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Sat, 28 Feb 2004 22:05:46 +0000 Subject: Let the port choose between a PGSQL or MYSQL backend. Fix compilation of net/zabbix when using the PGSQL backend. (author informed) PR: 61773, 62856 Submitted by: Michal F. Hanula , edwin@Mavetju.org Approved by: maintainer timeout --- net-mgmt/zabbix2/files/patch-include::db.c | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 net-mgmt/zabbix2/files/patch-include::db.c (limited to 'net-mgmt/zabbix2/files/patch-include::db.c') diff --git a/net-mgmt/zabbix2/files/patch-include::db.c b/net-mgmt/zabbix2/files/patch-include::db.c new file mode 100644 index 000000000000..65b688a2ee3d --- /dev/null +++ b/net-mgmt/zabbix2/files/patch-include::db.c @@ -0,0 +1,41 @@ +--- include/db.c.orig Sun Feb 15 09:55:55 2004 ++++ include/db.c Sun Feb 15 09:56:53 2004 +@@ -123,6 +123,10 @@ + */ + int DBexecute(char *query) + { ++#ifdef HAVE_PGSQL ++ PGresult *result; ++#endif ++ + /* zabbix_set_log_level(LOG_LEVEL_DEBUG);*/ + zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query); + #ifdef HAVE_MYSQL +@@ -138,8 +142,6 @@ + } + #endif + #ifdef HAVE_PGSQL +- PGresult *result; +- + result = PQexec(conn,query); + + if( result==NULL) +@@ -168,6 +170,9 @@ + */ + DB_RESULT *DBselect(char *query) + { ++#ifdef HAVE_PGSQL ++ PGresult *result; ++#endif + /* zabbix_set_log_level(LOG_LEVEL_DEBUG);*/ + zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query); + #ifdef HAVE_MYSQL +@@ -185,8 +190,6 @@ + return mysql_store_result(&mysql); + #endif + #ifdef HAVE_PGSQL +- PGresult *result; +- + result = PQexec(conn,query); + + if( result==NULL) -- cgit v1.2.3