OK.

There were no other problems, the PostgreSQL update is OK sthen@


On 2022/01/12 15:30, Jeremy Evans wrote:
> On 01/12 09:58, Stuart Henderson wrote:
> > www/kore,pgsql:
> > 
> > cc -O2 -pipe -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes 
> > -Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare 
> > -Iinclude/kore -Iobj -std=c99 -pedantic -DPREFIX='"/usr/local"' 
> > -fstack-protector-all -I/usr/local/include/postgresql -DKORE_USE_PGSQL 
> > -DPGSQL_INCLUDE_PATH="\"/usr/local/include/postgresql\"" -DKORE_USE_TASKS 
> > -c src/pgsql.c -o obj/pgsql.o
> > src/pgsql.c:774:10: error: enumeration values 'PGRES_PIPELINE_SYNC' and 
> > 'PGRES_PIPELINE_ABORTED' not handled in switch [-Werror,-Wswitch]
> >         switch (PQresultStatus(pgsql->result)) {
> >                 ^
> > 1 error generated.
> > gmake: *** [Makefile:251: obj/pgsql.o] Error 1
> > 
> 
> This patch should allow kore,pgsql to build (taken from a couple
> different upstream patches).
> 
> Thanks,
> Jeremy
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/www/kore/Makefile,v
> retrieving revision 1.29
> diff -u -p -r1.29 Makefile
> --- Makefile  2 Nov 2021 00:02:51 -0000       1.29
> +++ Makefile  12 Jan 2022 15:28:34 -0000
> @@ -3,7 +3,7 @@
>  COMMENT =    web application framework for writing scalable web APIs in C
>  
>  DISTNAME =   kore-4.1.0
> -REVISION =   1
> +REVISION =   2
>  
>  CATEGORIES = www
>  
> Index: patches/patch-src_pgsql_c
> ===================================================================
> RCS file: patches/patch-src_pgsql_c
> diff -N patches/patch-src_pgsql_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_pgsql_c 12 Jan 2022 15:25:47 -0000
> @@ -0,0 +1,18 @@
> +$OpenBSD$
> +
> +Work with PostgreSQL 14.
> +
> +Index: src/pgsql.c
> +--- src/pgsql.c.orig
> ++++ src/pgsql.c
> +@@ -772,6 +772,10 @@ pgsql_read_result(struct kore_pgsql *pgsql)
> +     }
> + 
> +     switch (PQresultStatus(pgsql->result)) {
> ++#if PG_VERSION_NUM >= 140000
> ++    case PGRES_PIPELINE_SYNC:
> ++    case PGRES_PIPELINE_ABORTED:
> ++#endif
> +     case PGRES_COPY_OUT:
> +     case PGRES_COPY_IN:
> +     case PGRES_NONFATAL_ERROR:
> 

Reply via email to