LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libQtShadowsocks-make_unique.patch of Package libQtShadowsocks (Project home:MargueriteSu)

Index: libQtShadowsocks-2.1.0/lib/crypto/cipher.h
===================================================================
--- libQtShadowsocks-2.1.0.orig/lib/crypto/cipher.h
+++ libQtShadowsocks-2.1.0/lib/crypto/cipher.h
@@ -35,6 +35,7 @@
 #include "rc4.h"
 #include "chacha.h"
 #include "util/export.h"
+#include "make_unique.h"
 
 namespace Botan {
 class Keyed_Filter;
Index: libQtShadowsocks-2.1.0/lib/make_unique.h
===================================================================
--- /dev/null
+++ libQtShadowsocks-2.1.0/lib/make_unique.h
@@ -0,0 +1,9 @@
+#if __GLIBCXX__ <= 20150623
+namespace std {
+	template<class T, class... Args>
+		unique_ptr<T> make_unique(Args &&... args)
+		{
+			    return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
+		}
+}
+#endif