diff --git a/nghttp2-c++14.patch b/nghttp2-c++14.patch new file mode 100644 index 0000000..90303b3 --- /dev/null +++ b/nghttp2-c++14.patch @@ -0,0 +1,20 @@ +--- src/template.h.orig 2016-01-28 15:30:56.549094834 +0100 ++++ src/template.h 2016-01-28 15:42:13.188970636 +0100 +@@ -37,6 +37,9 @@ + + namespace nghttp2 { + ++#if __cplusplus > 201103L ++using std::make_unique; ++#else + template + typename std::enable_if::value, std::unique_ptr>::type + make_unique(U &&... u) { +@@ -48,6 +51,7 @@ + make_unique(size_t size) { + return std::unique_ptr(new typename std::remove_extent::type[size]()); + } ++#endif + + // std::forward is constexpr since C++14 + template diff --git a/nghttp2.changes b/nghttp2.changes index 529dfe9..bc1194f 100644 --- a/nghttp2.changes +++ b/nghttp2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 28 14:43:56 UTC 2016 - rguenther@suse.com + +- Add nghttp2-c++14.patch to properly guard make_unique templates. + [bsc#964140] + ------------------------------------------------------------------- Tue Jan 26 20:02:00 UTC 2016 - mpluskal@suse.com diff --git a/nghttp2.spec b/nghttp2.spec index 59c73d1..aa4f0a2 100644 --- a/nghttp2.spec +++ b/nghttp2.spec @@ -1,7 +1,7 @@ # # spec file for package nghttp2 # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,7 @@ Source: https://github.com/tatsuhiro-t/%{name}/releases/download/v%{vers Source1: baselibs.conf # PATCH-FIX-OPENSUSE nghttp2-remove-python-build.patch Patch0: %{name}-remove-python-build.patch +Patch1: %{name}-c++14.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: boost-devel @@ -114,6 +115,7 @@ HTTP/2 client, server and proxy. %prep %setup -q %patch0 -p1 +%patch1 %build autoreconf -fiv