From owner-svn-ports-head@freebsd.org Fri Sep 22 16:11:56 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ACE5E03908; Fri, 22 Sep 2017 16:11:56 +0000 (UTC) (envelope-from ler@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 mx1.freebsd.org (Postfix) with ESMTPS id EBC99726A8; Fri, 22 Sep 2017 16:11:55 +0000 (UTC) (envelope-from ler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8MGBtvl032670; Fri, 22 Sep 2017 16:11:55 GMT (envelope-from ler@FreeBSD.org) Received: (from ler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MGBsoq032667; Fri, 22 Sep 2017 16:11:54 GMT (envelope-from ler@FreeBSD.org) Message-Id: <201709221611.v8MGBsoq032667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ler set sender to ler@FreeBSD.org using -f From: Larry Rosenman Date: Fri, 22 Sep 2017 16:11:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r450394 - head/security/clamav/files X-SVN-Group: ports-head X-SVN-Commit-Author: ler X-SVN-Commit-Paths: head/security/clamav/files X-SVN-Commit-Revision: 450394 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.23 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, 22 Sep 2017 16:11:56 -0000 Author: ler Date: Fri Sep 22 16:11:54 2017 New Revision: 450394 URL: https://svnweb.freebsd.org/changeset/ports/450394 Log: security/clamav: Compile-time test fails during portinstall Apply patch from upstream. PR: 221513 Submitted by: jny@jny.dk, fsbruva@yahoo.com Added: head/security/clamav/files/patch-libclamav_bytecode__api.c (contents, props changed) head/security/clamav/files/patch-libclamav_c++_llvm_include_llvm_Support_CFG.h (contents, props changed) Deleted: head/security/clamav/files/patch-libclamav-c++-llvm Modified: head/security/clamav/files/patch-configure Modified: head/security/clamav/files/patch-configure ============================================================================== --- head/security/clamav/files/patch-configure Fri Sep 22 16:00:05 2017 (r450393) +++ head/security/clamav/files/patch-configure Fri Sep 22 16:11:54 2017 (r450394) @@ -12,15 +12,6 @@ fi if test -n "$vuln"; then -@@ -20758,7 +20758,7 @@ $as_echo "#define C_BSD 1" >>confdefs.h - ;; - freebsd*) - if test "$have_pthreads" = "yes"; then -- THREAD_LIBS="-lthr" -+ THREAD_LIBS="%%PTHREAD_LIBS%%" - TH_SAFE="-thread-safe" - fi - @@ -20934,7 +20934,7 @@ esac if test "$have_milter" = "yes"; then Added: head/security/clamav/files/patch-libclamav_bytecode__api.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clamav/files/patch-libclamav_bytecode__api.c Fri Sep 22 16:11:54 2017 (r450394) @@ -0,0 +1,44 @@ +--- libclamav/bytecode_api.c.orig 2016-04-22 15:02:19 UTC ++++ libclamav/bytecode_api.c +@@ -811,8 +811,19 @@ int32_t cli_bcapi_inflate_init(struct cli_bc_ctx *ctx, + cli_dbgmsg("bytecode api: inflate_init: invalid buffers!\n"); + return -1; + } +- memset(&stream, 0, sizeof(stream)); +- ret = inflateInit2(&stream, windowBits); ++ b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n); ++ if (!b) { ++ return -1; ++ } ++ ctx->inflates = b; ++ ctx->ninflates = n; ++ b = &b[n-1]; ++ ++ b->from = from; ++ b->to = to; ++ b->needSync = 0; ++ memset(&b->stream, 0, sizeof(stream)); ++ ret = inflateInit2(&b->stream, windowBits); + switch (ret) { + case Z_MEM_ERROR: + cli_dbgmsg("bytecode api: inflateInit2: out of memory!\n"); +@@ -830,19 +841,6 @@ int32_t cli_bcapi_inflate_init(struct cli_bc_ctx *ctx, + return -1; + } + +- b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n); +- if (!b) { +- inflateEnd(&stream); +- return -1; +- } +- ctx->inflates = b; +- ctx->ninflates = n; +- b = &b[n-1]; +- +- b->from = from; +- b->to = to; +- b->needSync = 0; +- memcpy(&b->stream, &stream, sizeof(stream)); + return n-1; + } + Added: head/security/clamav/files/patch-libclamav_c++_llvm_include_llvm_Support_CFG.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clamav/files/patch-libclamav_c++_llvm_include_llvm_Support_CFG.h Fri Sep 22 16:11:54 2017 (r450394) @@ -0,0 +1,62 @@ +--- libclamav/c++/llvm/include/llvm/Support/CFG.h.orig 2016-04-22 15:02:19 UTC ++++ libclamav/c++/llvm/include/llvm/Support/CFG.h +@@ -27,8 +27,9 @@ namespace llvm { + + template // Predecessor Iterator + class PredIterator : public std::iterator { +- typedef std::iterator super; ++ Ptr, ptrdiff_t, Ptr*, Ptr*> { ++ typedef std::iterator super; + typedef PredIterator Self; + USE_iterator It; + +@@ -40,6 +41,7 @@ class PredIterator : public std::iteratoruse_begin()) { + advancePastNonTerminators(); +@@ -49,7 +51,7 @@ class PredIterator : public std::iterator(*It)->getParent(); + } +@@ -87,10 +89,11 @@ inline const_pred_iterator pred_end(const BasicBlock * + + template // Successor Iterator + class SuccIterator : public std::iterator { ++ BB_, ptrdiff_t, BB_*, BB_*> { + const Term_ Term; + unsigned idx; +- typedef std::iterator super; ++ typedef std::iterator super; + typedef SuccIterator Self; + + inline bool index_is_valid(int idx) { +@@ -99,6 +102,7 @@ class SuccIterator : public std::iteratorgetSuccessor(idx); } ++ inline reference operator*() const { return Term->getSuccessor(idx); } + inline pointer operator->() const { return operator*(); } + + inline Self& operator++() { ++idx; return *this; } // Preincrement