package/uhd: fix build with gcc 11

Fix the following build failure with gcc 11:

In file included from /tmp/instance-4/output-1/build/uhd-3.15.0.0/host/lib/usrp/dboard/e3xx/e3xx_ad9361_iface.hpp:14,
                 from /tmp/instance-4/output-1/build/uhd-3.15.0.0/host/lib/usrp/dboard/e3xx/e3xx_ad9361_iface.cpp:7:
/tmp/instance-4/output-1/build/uhd-3.15.0.0/host/lib/include/uhdlib/utils/rpc.hpp: In function 'bool {anonymous}::await_rpc_connected_state(std::shared_ptr<rpc::client>, std::chrono::milliseconds)':
/tmp/instance-4/output-1/build/uhd-3.15.0.0/host/lib/include/uhdlib/utils/rpc.hpp:28:27: error: 'sleep_for' is not a member of 'std::this_thread'
   28 |         std::this_thread::sleep_for(std::chrono::milliseconds(1));
      |                           ^~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/1591ff7fabb09e4eb79f3aa293fbb228c255c45b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Fabrice Fontaine 2021-08-05 10:59:55 +02:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent 64b33c22a7
commit 38f9f5bb30

View File

@ -0,0 +1,28 @@
From 9c4d9d826a6f40f199c526afd5ec168d5d088591 Mon Sep 17 00:00:00 2001
From: Martin Braun <martin.braun@ettus.com>
Date: Fri, 29 Jan 2021 12:23:50 +0100
Subject: [PATCH] lib: Fix missing includes in rpc.hpp
[Retrieved from:
https://github.com/EttusResearch/uhd/commit/9c4d9d826a6f40f199c526afd5ec168d5d088591]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
host/lib/include/uhdlib/utils/rpc.hpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/host/lib/include/uhdlib/utils/rpc.hpp b/host/lib/include/uhdlib/utils/rpc.hpp
index e87a2ee324..ca89c10547 100644
--- a/host/lib/include/uhdlib/utils/rpc.hpp
+++ b/host/lib/include/uhdlib/utils/rpc.hpp
@@ -12,7 +12,11 @@
#include <rpc/client.h>
#include <rpc/rpc_error.h>
#include <boost/format.hpp>
+#include <chrono>
#include <memory>
+#include <mutex>
+#include <string>
+#include <thread>
namespace {