fix build

This commit is contained in:
David Tardon 2015-07-23 14:08:50 +02:00
parent a556bf327b
commit 0680f69462
2 changed files with 36 additions and 0 deletions

34
0001-fix-build.patch Normal file
View File

@ -0,0 +1,34 @@
From 4827d155bcad9ee39bf850466d4970c18fd1a94a Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 23 Jul 2015 13:44:14 +0200
Subject: [PATCH] fix build
---
host/lib/usrp/b200/b200_io_impl.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp
index 262c95f..c228637 100644
--- a/host/lib/usrp/b200/b200_io_impl.cpp
+++ b/host/lib/usrp/b200/b200_io_impl.cpp
@@ -184,7 +184,7 @@ boost::optional<uhd::msg_task::msg_type_t> b200_impl::handle_async_task(
{
managed_recv_buffer::sptr buff = xport->get_recv_buff();
if (not buff or buff->size() < 8)
- return NULL;
+ return boost::none;
const boost::uint32_t sid = uhd::wtohx(buff->cast<const boost::uint32_t *>()[1]);
switch (sid) {
@@ -248,7 +248,7 @@ boost::optional<uhd::msg_task::msg_type_t> b200_impl::handle_async_task(
default:
UHD_MSG(error) << "Got a ctrl packet with unknown SID " << sid << std::endl;
}
- return NULL;
+ return boost::none;
}
/***********************************************************************
--
2.1.0

View File

@ -42,6 +42,7 @@ Source1: %{name}-limits.conf
Source2: http://files.ettus.com/binaries/images/uhd-images_%{ver}-release.tar.gz
# Fix firmware build with sdcc-3
Patch0: uhd-3.4.2-sdcc-3-fix.patch
Patch1: 0001-fix-build.patch
%description
The UHD is the universal hardware driver for Ettus Research products.
@ -81,6 +82,7 @@ Tools that are useful for working with and/or debugging USRP device.
%prep
%setup -q -n uhd-release_%{ver_}
%patch0 -p1 -b .sdcc-3-fix
%patch1 -p1 -b .fix-build
# firmware
%if %{with binary_firmware}