Since the test program fails to compile, configure thinks compiler is
not having thread support and bails out

Signed-off-by: Khem Raj <[email protected]>
---
 ...01-ax_cpp11.m4-Include-memory-header.patch | 29 +++++++++++++++++++
 .../kea/files/0001-include-limits.h.patch     | 29 +++++++++++++++++++
 meta/recipes-connectivity/kea/kea_1.8.2.bb    |  2 ++
 3 files changed, 60 insertions(+)
 create mode 100644 
meta/recipes-connectivity/kea/files/0001-ax_cpp11.m4-Include-memory-header.patch
 create mode 100644 
meta/recipes-connectivity/kea/files/0001-include-limits.h.patch

diff --git 
a/meta/recipes-connectivity/kea/files/0001-ax_cpp11.m4-Include-memory-header.patch
 
b/meta/recipes-connectivity/kea/files/0001-ax_cpp11.m4-Include-memory-header.patch
new file mode 100644
index 0000000000..f7f98c4d6e
--- /dev/null
+++ 
b/meta/recipes-connectivity/kea/files/0001-ax_cpp11.m4-Include-memory-header.patch
@@ -0,0 +1,29 @@
+From 5314a4815006e3a42f3ce265d1597db700cdb784 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 26 Feb 2021 23:14:20 -0800
+Subject: [PATCH] ax_cpp11.m4: Include <memory> header
+
+This is needed for std::shared_ptr
+GCC-11 throws errors if header is not included
+
+Upstream-Status: Submitted [https://github.com/isc-projects/kea/pull/120]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ m4macros/ax_cpp11.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/m4macros/ax_cpp11.m4 b/m4macros/ax_cpp11.m4
+index 6176728..6b14a84 100644
+--- a/m4macros/ax_cpp11.m4
++++ b/m4macros/ax_cpp11.m4
+@@ -182,6 +182,7 @@ for retry in "none" "--std=c++11" "--std=c++0x" 
"--std=c++1x" "fail"; do
+       AC_COMPILE_IFELSE(
+               [AC_LANG_PROGRAM(
+                       [#include <thread>
++                       #include <memory>
+                        std::shared_ptr<std::thread> th;],
+                       [th.reset(new std::thread([[]]() { return; }));
+                        th->join();])],
+-- 
+2.30.1
+
diff --git a/meta/recipes-connectivity/kea/files/0001-include-limits.h.patch 
b/meta/recipes-connectivity/kea/files/0001-include-limits.h.patch
new file mode 100644
index 0000000000..4bb76e2344
--- /dev/null
+++ b/meta/recipes-connectivity/kea/files/0001-include-limits.h.patch
@@ -0,0 +1,29 @@
+From 7bca122e15bbe98c7b8da851ef3e1cf9a714afd9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 26 Feb 2021 23:31:15 -0800
+Subject: [PATCH] include limits.h
+
+Fixes build with gcc11
+backend_selector.cc:61:35: error: 'numeric_limits' is not a member of 'std'
+
+Upstream-Status: Submitted [https://github.com/isc-projects/kea/pull/120]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/lib/exceptions/exceptions.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/lib/exceptions/exceptions.h b/src/lib/exceptions/exceptions.h
+index f5368c8..494ec69 100644
+--- a/src/lib/exceptions/exceptions.h
++++ b/src/lib/exceptions/exceptions.h
+@@ -7,6 +7,7 @@
+ #ifndef EXCEPTIONS_H
+ #define EXCEPTIONS_H 1
+ 
++#include <limits>
+ #include <stdexcept>
+ #include <string>
+ #include <sstream>
+-- 
+2.30.1
+
diff --git a/meta/recipes-connectivity/kea/kea_1.8.2.bb 
b/meta/recipes-connectivity/kea/kea_1.8.2.bb
index 3dc4f6af70..fe10d90620 100644
--- a/meta/recipes-connectivity/kea/kea_1.8.2.bb
+++ b/meta/recipes-connectivity/kea/kea_1.8.2.bb
@@ -18,6 +18,8 @@ SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
            file://fix-multilib-conflict.patch \
            file://fix_pid_keactrl.patch \
            
file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \
+           file://0001-ax_cpp11.m4-Include-memory-header.patch \
+           file://0001-include-limits.h.patch \
            "
 SRC_URI[sha256sum] = 
"486ca7abedb9d6fdf8e4344ad8688d1171f2ef0f5506d118988aadeae80a1d39"
 
-- 
2.30.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148720): 
https://lists.openembedded.org/g/openembedded-core/message/148720
Mute This Topic: https://lists.openembedded.org/mt/80946967/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to