[libmsn] Patch to make libmsn 4.2.1 building with GCC 4.7

Robert Scheck robert at fedoraproject.org
Sun Jan 15 19:58:54 UTC 2012


commit e3a4d66b8c5b77bdb5a3bc607270a464b7a93c24
Author: Robert Scheck <robert at fedoraproject.org>
Date:   Sun Jan 15 20:58:45 2012 +0100

    Patch to make libmsn 4.2.1 building with GCC 4.7

 libmsn-4.2.1-unistd.patch |   15 +++++++++++++++
 libmsn.spec               |    2 ++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/libmsn-4.2.1-unistd.patch b/libmsn-4.2.1-unistd.patch
new file mode 100644
index 0000000..b632389
--- /dev/null
+++ b/libmsn-4.2.1-unistd.patch
@@ -0,0 +1,15 @@
+Patch by Robert Scheck <robert at fedoraproject.org> for libmsn >= 4.2.1, that
+adds the missing include "unistd.h" for unlink(). Without that patch, any
+rebuild of libmsn using GCC 4.7 is going to fail, like it is doing already
+on Fedora 17+.
+
+--- libmsn-4.2.1/msn/util.cpp		2009-07-22 21:57:10.000000000 +0200
++++ libmsn-4.2.1/msn/util.cpp.unistd	2012-01-15 20:44:17.000000000 +0100
+@@ -30,6 +30,7 @@
+ #include <openssl/rand.h>
+ #include <cstring>
+ #include <sys/timeb.h>
++#include <unistd.h>
+ #include "md5.h"
+ #include "libsiren/siren7.h"
+ 
diff --git a/libmsn.spec b/libmsn.spec
index 9d785ad..73e796a 100644
--- a/libmsn.spec
+++ b/libmsn.spec
@@ -8,6 +8,7 @@ Group:		System Environment/Libraries
 License:	GPLv2
 URL:		http://sourceforge.net/projects/libmsn/
 Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
+Patch0:		libmsn-4.2.1-unistd.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	cmake
@@ -29,6 +30,7 @@ developing applications that use %{name}.
 
 %prep
 %setup -q -n %{name}-%{version}
+%patch0 -p1 -b .unistd
 
 
 %build


More information about the scm-commits mailing list