diff options
author | edwin <edwin@FreeBSD.org> | 2004-02-29 06:05:46 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2004-02-29 06:05:46 +0800 |
commit | 9125cb0170affe1750111a4856bea824a5720186 (patch) | |
tree | 9e4c4e081cefd357f6558ab19843c2c0c26a024d /net-mgmt/zabbix2/files | |
parent | 8bb347c06f676bf78d81b0c9434d745dd4d74948 (diff) | |
download | freebsd-ports-gnome-9125cb0170affe1750111a4856bea824a5720186.tar.gz freebsd-ports-gnome-9125cb0170affe1750111a4856bea824a5720186.tar.zst freebsd-ports-gnome-9125cb0170affe1750111a4856bea824a5720186.zip |
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
Diffstat (limited to 'net-mgmt/zabbix2/files')
-rw-r--r-- | net-mgmt/zabbix2/files/patch-include::db.c | 41 |
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) |