mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-10-01 13:06:01 +00:00
nodejs: fix additional compatibility with older gcc
- replace all occurrences of std::make_unique with wrapper - sync indent level Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
1249297f32
commit
bef21ed9aa
@ -5,22 +5,42 @@ method to be compatible with gcc < 4.9 .
|
|||||||
Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
|
Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
|
||||||
|
|
||||||
diff -Naur node-v10.15.1/src/cares_wrap.cc node-v10.15.1/src/cares_wrap.cc
|
diff -Naur node-v10.15.1/src/cares_wrap.cc node-v10.15.1/src/cares_wrap.cc
|
||||||
--- node-v10.15.1/src/cares_wrap.cc 2019-02-17 09:40:36.040538319 +0100
|
--- node-v10.15.1/src/cares_wrap.cc 2019-01-29 08:20:50.000000000 +0100
|
||||||
+++ node-v10.15.1/src/cares_wrap.cc 2019-02-17 09:39:57.883668702 +0100
|
+++ node-v10.15.1/src/cares_wrap.cc 2019-02-21 16:22:25.489131665 +0100
|
||||||
@@ -52,6 +52,16 @@
|
@@ -52,6 +52,16 @@
|
||||||
# define AI_V4MAPPED 0
|
# define AI_V4MAPPED 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
+#ifndef __cpp_lib_make_unique
|
+#ifndef __cpp_lib_make_unique
|
||||||
+ namespace std {
|
+namespace std {
|
||||||
+ /// make_unique implementation
|
+ /// make_unique implementation
|
||||||
+ template<typename T, typename... Args>
|
+ template<typename T, typename... Args>
|
||||||
+ std::unique_ptr<T> make_unique(Args&&... args) {
|
+ std::unique_ptr<T> make_unique(Args&&... args) {
|
||||||
+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||||
+ }
|
|
||||||
+ }
|
+ }
|
||||||
|
+}
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
namespace node {
|
namespace node {
|
||||||
namespace cares_wrap {
|
namespace cares_wrap {
|
||||||
|
|
||||||
|
diff -Naur node-v10.15.1/src/inspector_agent.cc node-v10.15.1/src/inspector_agent.cc
|
||||||
|
--- node-v10.15.1/src/inspector_agent.cc 2019-01-29 08:20:50.000000000 +0100
|
||||||
|
+++ node-v10.15.1/src/inspector_agent.cc 2019-02-21 16:22:09.000185992 +0100
|
||||||
|
@@ -24,6 +24,16 @@
|
||||||
|
#include <pthread.h>
|
||||||
|
#endif // __POSIX__
|
||||||
|
|
||||||
|
+#ifndef __cpp_lib_make_unique
|
||||||
|
+namespace std {
|
||||||
|
+ /// make_unique implementation
|
||||||
|
+ template<typename T, typename... Args>
|
||||||
|
+ std::unique_ptr<T> make_unique(Args&&... args) {
|
||||||
|
+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
namespace node {
|
||||||
|
namespace inspector {
|
||||||
|
namespace {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user