[mspdebug] Fix build by patching in missing includes

rspanton rspanton at fedoraproject.org
Thu Dec 6 11:18:27 UTC 2012


commit 35a7b6a4b1dd4f1d9e7d4ca5f4b9cc1e2a483687
Author: Rob Spanton <rspanton at zepler.net>
Date:   Thu Dec 6 11:16:16 2012 +0000

    Fix build by patching in missing includes
    
    I've already sent this patch upstream, and it's in their git.

 missing-includes.patch |   27 +++++++++++++++++++++++++++
 mspdebug.spec          |   10 +++++++++-
 2 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/missing-includes.patch b/missing-includes.patch
new file mode 100644
index 0000000..fbd1528
--- /dev/null
+++ b/missing-includes.patch
@@ -0,0 +1,27 @@
+From f94383d839086f502972483bc7997f24bee406eb Mon Sep 17 00:00:00 2001
+From: Rob Spanton <rspanton at zepler.net>
+Date: Thu, 29 Nov 2012 17:36:11 +0000
+Subject: [PATCH 1/2] Add two missing includes to util.c
+
+util.c was missing sys/select.h and sys/time.h.  On some platforms,
+this lead to warnings.
+---
+ util/sport.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/util/sport.c b/util/sport.c
+index 309f71e..d20c71f 100644
+--- a/util/sport.c
++++ b/util/sport.c
+@@ -20,6 +20,8 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include <string.h>
++#include <sys/select.h>
++#include <sys/time.h>
+ 
+ #include "sport.h"
+ #include "util.h"
+-- 
+1.7.11.7
+
diff --git a/mspdebug.spec b/mspdebug.spec
index b2de375..3ef31d7 100644
--- a/mspdebug.spec
+++ b/mspdebug.spec
@@ -1,11 +1,15 @@
 Name:		mspdebug
 Version:	0.21
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Debugger and gdb proxy for MSP430 MCUs
 Group:		Development/Tools
 License:	GPLv2+
 URL:		http://mspdebug.sourceforge.net/
 Source0:	https://downloads.sourceforge.net/project/mspdebug/mspdebug-%{version}.tar.gz
+
+# This patch is now upstreamed.  f94383d8390 in mspdebug's git
+Patch0:		missing-includes.patch
+
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	libusb-devel
 BuildRequires:	readline-devel
@@ -18,6 +22,7 @@ disassembly and reverse engineering.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 # add -DDEBUG_GDB to CFLAGS for gdb debugging output
@@ -40,6 +45,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/mspdebug
 
 %changelog
+* Thu Dec 06 2012 Rob Spanton <rspanton at zepler.net> - 0.21-2
+- Patch missing includes in to fix build
+
 * Thu Nov 29 2012 Rob Spanton <rspanton at zepler.net> - 0.21-1
 - Upgrade to 0.21
 


More information about the scm-commits mailing list