From owner-svn-ports-head@freebsd.org Fri Aug 16 18:09:25 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0BB1AA262; Fri, 16 Aug 2019 18:09:25 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469BD54mPtz4Wvt; Fri, 16 Aug 2019 18:09:25 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85A4D4FFC; Fri, 16 Aug 2019 18:09:25 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7GI9Ptc024736; Fri, 16 Aug 2019 18:09:25 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GI9OhO024733; Fri, 16 Aug 2019 18:09:24 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <201908161809.x7GI9OhO024733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sunpoet set sender to sunpoet@FreeBSD.org using -f From: Sunpoet Po-Chuan Hsieh Date: Fri, 16 Aug 2019 18:09:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r509088 - head/databases/postgresql-plproxy/files X-SVN-Group: ports-head X-SVN-Commit-Author: sunpoet X-SVN-Commit-Paths: head/databases/postgresql-plproxy/files X-SVN-Commit-Revision: 509088 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Aug 2019 18:09:25 -0000 Author: sunpoet Date: Fri Aug 16 18:09:24 2019 New Revision: 509088 URL: https://svnweb.freebsd.org/changeset/ports/509088 Log: Fix build with PostgreSQL 10 and 11 Added: head/databases/postgresql-plproxy/files/ head/databases/postgresql-plproxy/files/patch-src-cluster.c (contents, props changed) head/databases/postgresql-plproxy/files/patch-src-execute.c (contents, props changed) head/databases/postgresql-plproxy/files/patch-src-function.c (contents, props changed) Added: head/databases/postgresql-plproxy/files/patch-src-cluster.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/postgresql-plproxy/files/patch-src-cluster.c Fri Aug 16 18:09:24 2019 (r509088) @@ -0,0 +1,26 @@ +--- src/cluster.c.orig 2017-10-08 08:53:35 UTC ++++ src/cluster.c +@@ -588,7 +588,11 @@ reload_sqlmed_user(ProxyFunction *func, + */ + aclresult = pg_foreign_server_aclcheck(um->serverid, um->userid, ACL_USAGE); + if (aclresult != ACLCHECK_OK) ++#if PG_VERSION_NUM >= 110000 ++ aclcheck_error(aclresult, OBJECT_FOREIGN_SERVER, cluster->name); ++#else + aclcheck_error(aclresult, ACL_KIND_FOREIGN_SERVER, cluster->name); ++#endif + + /* Extract the common connect string elements from user mapping */ + got_user = false; +@@ -657,7 +661,11 @@ reload_sqlmed_cluster(ProxyFunction *fun + */ + aclresult = pg_foreign_server_aclcheck(foreign_server->serverid, info->user_oid, ACL_USAGE); + if (aclresult != ACLCHECK_OK) ++#if PG_VERSION_NUM >= 110000 ++ aclcheck_error(aclresult, OBJECT_FOREIGN_SERVER, foreign_server->servername); ++#else + aclcheck_error(aclresult, ACL_KIND_FOREIGN_SERVER, foreign_server->servername); ++#endif + + /* drop old config values */ + clear_config(&cluster->config); Added: head/databases/postgresql-plproxy/files/patch-src-execute.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/postgresql-plproxy/files/patch-src-execute.c Fri Aug 16 18:09:24 2019 (r509088) @@ -0,0 +1,29 @@ +HAVE_NETINET_IN_H and HAVE_SYS_SOCKET_H were removed from pg_config.h in PostgreSQL 10 +HAVE_NETINET_TCP_H was removed from pg_config.h in PostgreSQL 11 + +--- src/execute.c.orig 2017-10-08 08:53:35 UTC ++++ src/execute.c +@@ -28,6 +28,7 @@ + #include "plproxy.h" + + #include ++#include + + #include "poll_compat.h" + +@@ -35,15 +36,9 @@ + #include + #include + #endif +-#ifdef HAVE_SYS_SOCKET_H + #include +-#endif +-#ifdef HAVE_NETINET_IN_H + #include +-#endif +-#ifdef HAVE_NETINET_TCP_H + #include +-#endif + #ifdef HAVE_ARPA_INET_H + #include + #endif Added: head/databases/postgresql-plproxy/files/patch-src-function.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/postgresql-plproxy/files/patch-src-function.c Fri Aug 16 18:09:24 2019 (r509088) @@ -0,0 +1,16 @@ +--- src/function.c.orig 2017-10-08 08:53:35 UTC ++++ src/function.c +@@ -214,8 +214,13 @@ fn_returns_dynamic_record(HeapTuple proc + Form_pg_proc proc_struct; + proc_struct = (Form_pg_proc) GETSTRUCT(proc_tuple); + if (proc_struct->prorettype == RECORDOID ++#if PG_VERSION_NUM >= 110000 ++ && (heap_attisnull(proc_tuple, Anum_pg_proc_proargmodes, NULL) ++ || heap_attisnull(proc_tuple, Anum_pg_proc_proargnames, NULL))) ++#else + && (heap_attisnull(proc_tuple, Anum_pg_proc_proargmodes) + || heap_attisnull(proc_tuple, Anum_pg_proc_proargnames))) ++#endif + return true; + return false; + }