diff --git a/contrib/ofed/libibnetdisc/Makefile b/contrib/ofed/libibnetdisc/Makefile index acd6ef602e74..5bd622de3394 100644 --- a/contrib/ofed/libibnetdisc/Makefile +++ b/contrib/ofed/libibnetdisc/Makefile @@ -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 diff --git a/contrib/ofed/libibnetdisc/g_hash_table.cpp b/contrib/ofed/libibnetdisc/g_hash_table.cpp index 941671b86d8c..457eed3f0bd7 100644 --- a/contrib/ofed/libibnetdisc/g_hash_table.cpp +++ b/contrib/ofed/libibnetdisc/g_hash_table.cpp @@ -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() { }; };