]> code.ossystems Code Review - openembedded-core.git/commitdiff
kea: Fix configure test error with gcc11
authorKhem Raj <raj.khem@gmail.com>
Sat, 27 Feb 2021 15:16:03 +0000 (07:16 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 1 Mar 2021 11:12:12 +0000 (11:12 +0000)
Since the test program fails to compile, configure thinks compiler is
not having thread support and bails out

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/kea/files/0001-ax_cpp11.m4-Include-memory-header.patch [new file with mode: 0644]
meta/recipes-connectivity/kea/files/0001-include-limits.h.patch [new file with mode: 0644]
meta/recipes-connectivity/kea/kea_1.8.2.bb

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 (file)
index 0000000..4978cae
--- /dev/null
@@ -0,0 +1,24 @@
+From 5314a4815006e3a42f3ce265d1597db700cdb784 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ m4macros/ax_cpp11.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/m4macros/ax_cpp11.m4
++++ b/m4macros/ax_cpp11.m4
+@@ -182,6 +182,7 @@ for retry in "none" "--std=c++11" "--std
+       AC_COMPILE_IFELSE(
+               [AC_LANG_PROGRAM(
+                       [#include <thread>
++                       #include <memory>
+                        std::shared_ptr<std::thread> th;],
+                       [th.reset(new std::thread([[]]() { return; }));
+                        th->join();])],
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 (file)
index 0000000..3856b3d
--- /dev/null
@@ -0,0 +1,35 @@
+From 7bca122e15bbe98c7b8da851ef3e1cf9a714afd9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ src/lib/exceptions/exceptions.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/lib/database/backend_selector.cc
++++ b/src/lib/database/backend_selector.cc
+@@ -6,7 +6,7 @@
+ #include <database/backend_selector.h>
+ #include <exceptions/exceptions.h>
+-#include <climits>
++#include <limits>
+ #include <sstream>
+ using namespace isc::data;
+--- a/src/lib/dhcpsrv/subnet_id.h
++++ b/src/lib/dhcpsrv/subnet_id.h
+@@ -10,6 +10,7 @@
+ #include <exceptions/exceptions.h>
+ #include <stdint.h>
+ #include <typeinfo>
++#include <limits>
+ namespace isc {
+ namespace dhcp {
index 3dc4f6af702835f9b86271919d5187928f3e2cac..fe10d90620decff812bbe1ea40e2e54ab8a9d289 100644 (file)
@@ -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"