diff --git a/devel/kore/Makefile b/devel/kore/Makefile index 27488fff5eff..393151b1d9ef 100644 --- a/devel/kore/Makefile +++ b/devel/kore/Makefile @@ -4,6 +4,7 @@ PORTNAME= kore PORTVERSION= 2.0.0 DISTVERSIONSUFFIX= -release +PORTREVISION= 1 CATEGORIES= devel www MAINTAINER= t@tobik.me diff --git a/devel/kore/files/patch-includes_pgsql.h b/devel/kore/files/patch-includes_pgsql.h new file mode 100644 index 000000000000..9c48f6979b04 --- /dev/null +++ b/devel/kore/files/patch-includes_pgsql.h @@ -0,0 +1,14 @@ +--- includes/pgsql.h.orig 2016-08-01 07:59:32 UTC ++++ includes/pgsql.h +@@ -66,9 +66,9 @@ void kore_pgsql_cleanup(struct kore_pgsq + void kore_pgsql_continue(struct http_request *, struct kore_pgsql *); + int kore_pgsql_query(struct kore_pgsql *, const char *); + int kore_pgsql_query_params(struct kore_pgsql *, +- const char *, int, u_int8_t, ...); ++ const char *, int, int, ...); + int kore_pgsql_v_query_params(struct kore_pgsql *, +- const char *, int, u_int8_t, va_list); ++ const char *, int, int, va_list); + int kore_pgsql_register(const char *, const char *); + int kore_pgsql_ntuples(struct kore_pgsql *); + void kore_pgsql_logerror(struct kore_pgsql *); diff --git a/devel/kore/files/patch-src_pgsql.c b/devel/kore/files/patch-src_pgsql.c index 646911d4fa19..5fa16068eb11 100644 --- a/devel/kore/files/patch-src_pgsql.c +++ b/devel/kore/files/patch-src_pgsql.c @@ -1,4 +1,6 @@ -Backport of https://github.com/jorisvink/kore/commit/c071d64bdddacbe1b69d238e14994d666a86f7cf +Backports of + +https://github.com/jorisvink/kore/commit/c071d64bdddacbe1b69d238e14994d666a86f7cf so compiling on FreeBSD 10.x/i386 succeeds. Without it the build will fail with: src/pgsql.c:222:6: error: variable 'args' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] @@ -16,9 +18,34 @@ src/pgsql.c:220:15: note: initialize the variable 'args' to silence this warning = NULL 1 error generated. +and https://github.com/jorisvink/kore/commit/7eced6f035c83c02680d9b58371851f8662a0e8a +so that compiling with Clang 3.9 succeeds. Without it the build will fail with: + +src/pgsql.c:222:17: error: passing an object that undergoes default argument promotion to 'va_start' + has undefined behavior [-Werror,-Wvarargs] + va_start(args, count); + ^ +src/pgsql.c:217:45: note: parameter of type 'u_int8_t' (aka 'unsigned char') is declared here + const char *query, int result, u_int8_t count, ...) + --- src/pgsql.c.orig 2016-08-01 07:59:32 UTC +++ src/pgsql.c -@@ -219,13 +219,11 @@ kore_pgsql_query_params(struct kore_pgsq +@@ -151,7 +151,7 @@ kore_pgsql_query(struct kore_pgsql *pgsq + + int + kore_pgsql_v_query_params(struct kore_pgsql *pgsql, +- const char *query, int result, u_int8_t count, va_list args) ++ const char *query, int result, int count, va_list args) + { + u_int8_t i; + char **values; +@@ -214,18 +214,16 @@ cleanup: + + int + kore_pgsql_query_params(struct kore_pgsql *pgsql, +- const char *query, int result, u_int8_t count, ...) ++ const char *query, int result, int count, ...) + { int ret; va_list args;