summaryrefslogtreecommitdiff
path: root/net-mgmt/zabbix2/files/patch-include::db.c
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2004-02-28 22:05:46 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2004-02-28 22:05:46 +0000
commit17a0f98920a143baf40a2eb01994cd95ce6fcbc9 (patch)
tree6140b4a7ad4e36e4aebf1e50d7abd1bafc95d937 /net-mgmt/zabbix2/files/patch-include::db.c
parentMIT KRB5 1.3.2 has been released. Remove the beta. (diff)
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 <f@7f000001.org>, edwin@Mavetju.org Approved by: maintainer timeout
Notes
Notes: svn path=/head/; revision=102469
Diffstat (limited to 'net-mgmt/zabbix2/files/patch-include::db.c')
-rw-r--r--net-mgmt/zabbix2/files/patch-include::db.c41
1 files changed, 41 insertions, 0 deletions
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)