Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2004 10:09:34 +1100 (EST)
From:      Edwin Groothuis <edwin@mavetju.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/62856: [patch] fix compilation for WITH_PGSQL
Message-ID:  <20040214230934.D10876A7101@k7.mavetju>
Resent-Message-ID: <200402142310.i1ENADcq029371@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040214230934.D10876A7101>