From owner-svn-ports-all@freebsd.org Fri Jan 26 14:39:33 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73731ED9AE1; Fri, 26 Jan 2018 14:39:33 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2925275AB8; Fri, 26 Jan 2018 14:39:33 +0000 (UTC) (envelope-from jbeich@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 2439E1CDB0; Fri, 26 Jan 2018 14:39:33 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0QEdXro003588; Fri, 26 Jan 2018 14:39:33 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0QEdXvq003587; Fri, 26 Jan 2018 14:39:33 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201801261439.w0QEdXvq003587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 26 Jan 2018 14:39:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r459998 - head/net-p2p/verlihub/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/net-p2p/verlihub/files X-SVN-Commit-Revision: 459998 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2018 14:39:33 -0000 Author: jbeich Date: Fri Jan 26 14:39:32 2018 New Revision: 459998 URL: https://svnweb.freebsd.org/changeset/ports/459998 Log: net-p2p/verlihub: unbreak build with Clang 6 (C++14 by default) casyncconn.cpp:585:62: error: invalid operands to binary expression ('__bind' and 'int') if(bind(sock, (struct sockaddr *)&mAddrIN, sizeof(mAddrIN)) == -1) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~ creguserinfo.cpp:156:32: error: non-constant-expression cannot be narrowed from type 'char' to 'unsigned char' in initializer list [-Wc++11-narrowing] unsigned char charsalt[2] = {((char*)&str)[0],((char*)&str)[1]}; ^~~~~~~~~~~~~~~~ creguserinfo.cpp:156:32: note: insert an explicit cast to silence this issue unsigned char charsalt[2] = {((char*)&str)[0],((char*)&str)[1]}; ^~~~~~~~~~~~~~~~ static_cast( ) script_api.cpp:221:10: error: cannot initialize return object of type 'char *' with an rvalue of type 'bool' return false; ^~~~~ script_api.cpp:226:46: error: cannot initialize return object of type 'char *' with an rvalue of type 'bool' if ((!usr) || (usr && !usr->mxConn)) return false; ^~~~~ Reported by: pkg-fallout (blocks 9 ports) Approved by: portmgr blanket Added: head/net-p2p/verlihub/files/patch-c++11 (contents, props changed) Added: head/net-p2p/verlihub/files/patch-c++11 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-p2p/verlihub/files/patch-c++11 Fri Jan 26 14:39:32 2018 (r459998) @@ -0,0 +1,71 @@ +libc++ doesn't like "using namespace std" in C++11 + +casyncconn.cpp:585:62: error: invalid operands to binary expression ('__bind' and 'int') + if(bind(sock, (struct sockaddr *)&mAddrIN, sizeof(mAddrIN)) == -1) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~ + +Part of https://github.com/Verlihub/verlihub/commit/60609e646824 + +creguserinfo.cpp:156:32: error: non-constant-expression cannot be narrowed from type 'char' to 'unsigned char' in initializer list [-Wc++11-narrowing] + unsigned char charsalt[2] = {((char*)&str)[0],((char*)&str)[1]}; + ^~~~~~~~~~~~~~~~ +creguserinfo.cpp:156:32: note: insert an explicit cast to silence this issue + unsigned char charsalt[2] = {((char*)&str)[0],((char*)&str)[1]}; + ^~~~~~~~~~~~~~~~ + static_cast( ) +creguserinfo.cpp:156:49: error: non-constant-expression cannot be narrowed from type 'char' to 'unsigned char' in initializer list [-Wc++11-narrowing] + unsigned char charsalt[2] = {((char*)&str)[0],((char*)&str)[1]}; + ^~~~~~~~~~~~~~~~ +creguserinfo.cpp:156:49: note: insert an explicit cast to silence this issue + unsigned char charsalt[2] = {((char*)&str)[0],((char*)&str)[1]}; + ^~~~~~~~~~~~~~~~ + static_cast( ) + +ParseCommand() returns bool since 1.0.0.0. + +script_api.cpp:221:10: error: cannot initialize return object of type 'char *' with an rvalue of type 'bool' + return false; + ^~~~~ +script_api.cpp:226:46: error: cannot initialize return object of type 'char *' with an rvalue of type 'bool' + if ((!usr) || (usr && !usr->mxConn)) return false; + ^~~~~ + +--- src/casyncconn.cpp.orig 2009-07-10 18:23:05 UTC ++++ src/casyncconn.cpp +@@ -575,7 +573,7 @@ int cAsyncConn::BindSocket(int sock, int port, const c + + + /* Bind socket to port */ +- if(bind(sock, (struct sockaddr *)&mAddrIN, sizeof(mAddrIN)) == -1) ++ if(::bind(sock, (struct sockaddr *)&mAddrIN, sizeof(mAddrIN)) == -1) + { + return -1; + } +--- src/creguserinfo.cpp.orig 2009-05-16 14:56:20 UTC ++++ src/creguserinfo.cpp +@@ -153,7 +153,7 @@ void nDirectConnect::nTables::cRegUserInfo::SetPass(st + static const char *saltchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmlopqrstuvwxyz0123456789./"; + static const int saltcharsnum = strlen(saltchars); + +- unsigned char charsalt[2] = {((char*)&str)[0],((char*)&str)[1]}; ++ unsigned char charsalt[2] = {(unsigned char)((char*)&str)[0], (unsigned char)((char*)&str)[1]}; + + #if HAVE_LIBSSL && HAVE_OPENSSL_MD5_H + unsigned char buf[MD5_DIGEST_LENGTH+1]; +--- src/script_api.cpp.orig 2009-05-16 14:42:07 UTC ++++ src/script_api.cpp +@@ -218,12 +218,12 @@ char * ParseCommand(char *command_line) + cServerDC *server = GetCurrentVerlihub(); + if(!server) { + cerr << "Server verlihub is unfortunately not running or not found." << endl; +- return false; ++ return NULL; + } + cUser *usr = GetUser((char *) server->mC.hub_security.c_str()); + printf("%p\n", usr); + printf("%p", usr->mxConn); +- if ((!usr) || (usr && !usr->mxConn)) return false; ++ if ((!usr) || (usr && !usr->mxConn)) return NULL; + cout << "here" << endl; + if (!server->mP.ParseForCommands(command_line, usr->mxConn)) { + // unknown command