diff options
author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2022-05-14 17:45:13 +0000 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2022-05-14 17:45:13 +0000 |
commit | 21b89b758b1c5c57b4ccbb02301da48ba5099753 (patch) | |
tree | c802f793bacc4ac9fce6f0a09e2d3ceb62e04924 | |
parent | 5fc8874c44f8ebe042c02d0cc5bc921969efcf2c (diff) | |
download | ports-21b89b758b1c5c57b4ccbb02301da48ba5099753.tar.gz ports-21b89b758b1c5c57b4ccbb02301da48ba5099753.zip |
www/libecap: Fix build with Clang 13+
-rw-r--r-- | www/libecap/files/patch-src-libecap-common-memory.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/www/libecap/files/patch-src-libecap-common-memory.h b/www/libecap/files/patch-src-libecap-common-memory.h index db4f9894ee89..74c88a184087 100644 --- a/www/libecap/files/patch-src-libecap-common-memory.h +++ b/www/libecap/files/patch-src-libecap-common-memory.h @@ -1,11 +1,13 @@ --- src/libecap/common/memory.h.orig 2014-10-02 04:05:24 UTC +++ src/libecap/common/memory.h -@@ -4,14 +4,23 @@ +@@ -4,14 +4,28 @@ #define LIBECAP__COMMON_MEMORY_H #include <libecap/common/libecap.h> +#if defined(_LIBCPP_VERSION) +#include <memory> ++#elif defined(__clang_major__) && __clang_major__ >= 13 ++#include <memory> +#else #include <tr1/memory> +#endif @@ -17,6 +19,9 @@ +#if defined(_LIBCPP_VERSION) +using std::weak_ptr; +using std::shared_ptr; ++#elif defined(__clang_major__) && __clang_major__ >= 13 ++using std::weak_ptr; ++using std::shared_ptr; +#else using std::tr1::weak_ptr; using std::tr1::shared_ptr; |