svn commit: r329566 - projects/bsd_rdma_4_9_stable_11/contrib/ofed/libibnetdisc
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Feb 19 12:23:18 UTC 2018
Author: hselasky
Date: Mon Feb 19 12:23:17 2018
New Revision: 329566
URL: https://svnweb.freebsd.org/changeset/base/329566
Log:
MFC r326716:
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:
projects/bsd_rdma_4_9_stable_11/contrib/ofed/libibnetdisc/Makefile
projects/bsd_rdma_4_9_stable_11/contrib/ofed/libibnetdisc/g_hash_table.cpp
Directory Properties:
projects/bsd_rdma_4_9_stable_11/ (props changed)
Modified: projects/bsd_rdma_4_9_stable_11/contrib/ofed/libibnetdisc/Makefile
==============================================================================
--- projects/bsd_rdma_4_9_stable_11/contrib/ofed/libibnetdisc/Makefile Mon Feb 19 12:21:56 2018 (r329565)
+++ projects/bsd_rdma_4_9_stable_11/contrib/ofed/libibnetdisc/Makefile Mon Feb 19 12:23:17 2018 (r329566)
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <src.opts.mk>
+
.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 <bsd.lib.mk>
Modified: projects/bsd_rdma_4_9_stable_11/contrib/ofed/libibnetdisc/g_hash_table.cpp
==============================================================================
--- projects/bsd_rdma_4_9_stable_11/contrib/ofed/libibnetdisc/g_hash_table.cpp Mon Feb 19 12:21:56 2018 (r329565)
+++ projects/bsd_rdma_4_9_stable_11/contrib/ofed/libibnetdisc/g_hash_table.cpp Mon Feb 19 12:23:17 2018 (r329566)
@@ -31,17 +31,17 @@
*
*/
-#if defined(__clang__)
+#if __cplusplus >= 201103L
#include <unordered_map>
-#define HASH_TABLE_UNORDERED_MAP std::unordered_map
+#define UM_NAMESPACE std
#else
#include <tr1/unordered_map>
-#define HASH_TABLE_UNORDERED_MAP std::tr1::unordered_map
+#define UM_NAMESPACE std::tr1
#endif
class HashTable {
public:
- HASH_TABLE_UNORDERED_MAP<void *, void *> map;
+ UM_NAMESPACE::unordered_map<void *, void *> map;
HashTable() { };
~HashTable() { };
};
More information about the svn-src-projects
mailing list