ports/62856: [patch] fix compilation for WITH_PGSQL
Edwin Groothuis
edwin at mavetju.org
Sat Feb 14 23:10:14 UTC 2004
>Number: 62856
>Category: ports
>Synopsis: [patch] fix compilation for WITH_PGSQL
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Feb 14 15:10:13 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Edwin Groothuis
>Release: FreeBSD 4.8-RELEASE i386
>Organization:
-
>Environment:
System: FreeBSD k7.mavetju 4.8-RELEASE FreeBSD 4.8-RELEASE #1: Mon Jan 5 18:59:31 EST 2004 edwin at k7.mavetju:/usr/src/sys/compile/k7 i386
>Description:
Compilation fails when using WITH_PGSQL (as a previous PR).
Informed maintainer.
Informed author.
>How-To-Repeat:
>Fix:
this is patch-include::db.c
--- 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)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list