From owner-svn-src-head@freebsd.org Fri Dec 8 21:01:10 2017 Return-Path: Delivered-To: svn-src-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 C3206E8F369; Fri, 8 Dec 2017 21:01:10 +0000 (UTC) (envelope-from hselasky@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 8B61763EAD; Fri, 8 Dec 2017 21:01:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8L19r3021023; Fri, 8 Dec 2017 21:01:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8L19nZ021021; Fri, 8 Dec 2017 21:01:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712082101.vB8L19nZ021021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Dec 2017 21:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326716 - head/contrib/ofed/libibnetdisc X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/contrib/ofed/libibnetdisc X-SVN-Commit-Revision: 326716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 21:01:10 -0000 Author: hselasky Date: Fri Dec 8 21:01:09 2017 New Revision: 326716 URL: https://svnweb.freebsd.org/changeset/base/326716 Log: Correctly define the unordered_map namespace in ofed/libibnetdisc . This should fix ofed/libibnetdisc compilation with C-compilers different from clang and GCC v4.2.1. Submitted by: kib Sponsored by: Mellanox Technologies Modified: head/contrib/ofed/libibnetdisc/Makefile head/contrib/ofed/libibnetdisc/g_hash_table.cpp Modified: head/contrib/ofed/libibnetdisc/Makefile ============================================================================== --- head/contrib/ofed/libibnetdisc/Makefile Fri Dec 8 20:04:10 2017 (r326715) +++ head/contrib/ofed/libibnetdisc/Makefile Fri Dec 8 21:01:09 2017 (r326716) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .PATH: ${.CURDIR} ${.CURDIR}/man SHLIBDIR?= /usr/lib @@ -28,6 +30,9 @@ LIBADD= osmcomp ibmad ibumad CFLAGS+= -DHAVE_CONFIG_H=1 CFLAGS+= -I${.CURDIR} CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband +.if ${COMPILER_FEATURES:Mc++11} +CXXFLAGS+= -std=c++11 +.endif VERSION_MAP= ${.CURDIR}/libibnetdisc.map .include Modified: head/contrib/ofed/libibnetdisc/g_hash_table.cpp ============================================================================== --- head/contrib/ofed/libibnetdisc/g_hash_table.cpp Fri Dec 8 20:04:10 2017 (r326715) +++ head/contrib/ofed/libibnetdisc/g_hash_table.cpp Fri Dec 8 21:01:09 2017 (r326716) @@ -31,17 +31,17 @@ * */ -#if defined(__clang__) +#if __cplusplus >= 201103L #include -#define HASH_TABLE_UNORDERED_MAP std::unordered_map +#define UM_NAMESPACE std #else #include -#define HASH_TABLE_UNORDERED_MAP std::tr1::unordered_map +#define UM_NAMESPACE std::tr1 #endif class HashTable { public: - HASH_TABLE_UNORDERED_MAP map; + UM_NAMESPACE::unordered_map map; HashTable() { }; ~HashTable() { }; };