From owner-svn-ports-all@FreeBSD.ORG Sun Sep 15 19:03:04 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 929633E3; Sun, 15 Sep 2013 19:03:04 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F5A62076; Sun, 15 Sep 2013 19:03:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FJ3492084181; Sun, 15 Sep 2013 19:03:04 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8FJ3449084176; Sun, 15 Sep 2013 19:03:04 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201309151903.r8FJ3449084176@svn.freebsd.org> From: Antoine Brodin Date: Sun, 15 Sep 2013 19:03:04 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r327355 - head/net/tcpflow/files X-SVN-Group: ports-head 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.14 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: Sun, 15 Sep 2013 19:03:04 -0000 Author: antoine Date: Sun Sep 15 19:03:03 2013 New Revision: 327355 URL: http://svnweb.freebsd.org/changeset/ports/327355 Log: Fix build with libc++ which does not has tr1 namespace Added: head/net/tcpflow/files/ head/net/tcpflow/files/patch-src__be13_api__plugin.cpp (contents, props changed) head/net/tcpflow/files/patch-src__tcpdemux.h (contents, props changed) Added: head/net/tcpflow/files/patch-src__be13_api__plugin.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/tcpflow/files/patch-src__be13_api__plugin.cpp Sun Sep 15 19:03:03 2013 (r327355) @@ -0,0 +1,48 @@ +--- ./src/be13_api/plugin.cpp.orig 2013-08-03 16:58:46.000000000 +0000 ++++ ./src/be13_api/plugin.cpp 2013-09-07 22:32:02.000000000 +0000 +@@ -9,7 +9,16 @@ + #include + #include + #include ++#ifdef __clang__ ++#if __has_include() ++#define HAVE_CXX11_UNORDERED_SET 1 ++#endif ++#endif ++#ifdef HAVE_CXX11_UNORDERED_SET ++#include ++#else + #include ++#endif + #ifdef HAVE_ERR_H + #include + #endif +@@ -23,20 +32,28 @@ + #include "../dfxml/src/hash_t.h" + + namespace std { ++#ifndef HAVE_CXX11_UNORDERED_SET + namespace tr1 { ++#endif + template<> + struct hash { + size_t operator()(const md5_t &key) const { + return *(size_t *)(key.final()); + } + }; ++#ifndef HAVE_CXX11_UNORDERED_SET + } ++#endif + } + + class atomic_hash_set + { + cppmutex M; ++#ifdef HAVE_CXX11_UNORDERED_SET ++ std::unordered_setmyset; ++#else + std::tr1::unordered_setmyset; ++#endif + public: + atomic_hash_set():M(),myset(){} + bool in(const md5_t &s){ Added: head/net/tcpflow/files/patch-src__tcpdemux.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/tcpflow/files/patch-src__tcpdemux.h Sun Sep 15 19:03:03 2013 (r327355) @@ -0,0 +1,39 @@ +--- ./src/tcpdemux.h.orig 2013-05-27 22:28:50.000000000 +0000 ++++ ./src/tcpdemux.h 2013-09-07 22:32:29.000000000 +0000 +@@ -20,8 +20,18 @@ + #include "pcap_writer.h" + #include "dfxml/src/dfxml_writer.h" + #include "dfxml/src/hash_t.h" ++#ifdef __clang__ ++#if __has_include() ++#define HAVE_CXX11_UNORDERED_SET 1 ++#endif ++#endif ++#ifdef HAVE_CXX11_UNORDERED_SET ++#include ++#include ++#else + #include + #include ++#endif + #include + + +@@ -53,10 +63,17 @@ + bool operator() (const flow_addr &x, const flow_addr &y) const { return x==y;} + } flow_addr_key_eq; + ++#ifdef HAVE_CXX11_UNORDERED_SET ++ typedef std::unordered_set tcpset; ++ typedef std::vector saved_flows_t; // needs to be ordered ++ typedef std::unordered_map flow_map_t; // active flows ++ typedef std::unordered_map saved_flow_map_t; // flows that have been saved ++#else + typedef std::tr1::unordered_set tcpset; + typedef std::vector saved_flows_t; // needs to be ordered + typedef std::tr1::unordered_map flow_map_t; // active flows + typedef std::tr1::unordered_map saved_flow_map_t; // flows that have been saved ++#endif + tcpdemux(); + public: + static uint32_t tcp_timeout;