[packages/cmocka] - added function patch (use __func__ instead of __FUNCTION__ when in >= C99/C++11 mode; fixes build

qboosh qboosh at pld-linux.org
Fri Jul 1 17:57:22 CEST 2016


commit 8e5c8f06d0aab835eb601f0094e334b51ec93d5a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jul 1 17:57:01 2016 +0200

    - added function patch (use __func__ instead of __FUNCTION__ when in >= C99/C++11 mode; fixes build with gcc 5)
    - release 2

 cmocka-function.patch | 11 +++++++++++
 cmocka.spec           |  4 +++-
 2 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/cmocka.spec b/cmocka.spec
index 07f344c..76d76bd 100644
--- a/cmocka.spec
+++ b/cmocka.spec
@@ -2,12 +2,13 @@ Summary:	Fork of Google's cmockery unit testing framework
 Summary(pl.UTF-8):	Odgałęzienie szkieletu testów jednostkowych cmockery Google'a
 Name:		cmocka
 Version:	1.0.0
-Release:	1
+Release:	2
 License:	Apache v2.0
 Group:		Libraries
 #Source0Download: https://open.cryptomilk.org/projects/cmocka/files
 Source0:	https://open.cryptomilk.org/attachments/download/54/%{name}-%{version}.tar.xz
 # Source0-md5:	3e68580d9c97601dd983cf098931f987
+Patch0:		%{name}-function.patch
 URL:		http://cmocka.org/
 BuildRequires:	cmake >= 2.6.0
 BuildRequires:	tar >= 1:1.22
@@ -38,6 +39,7 @@ Pliki programistyczne szkieletu cmocka.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 install -d build
diff --git a/cmocka-function.patch b/cmocka-function.patch
new file mode 100644
index 0000000..c4f62c5
--- /dev/null
+++ b/cmocka-function.patch
@@ -0,0 +1,11 @@
+--- cmocka-1.0.0/include/cmocka.h.orig	2015-02-13 13:50:50.000000000 +0100
++++ cmocka-1.0.0/include/cmocka.h	2016-07-01 06:08:43.313760702 +0200
+@@ -53,7 +53,7 @@
+  */
+ 
+ /* For those who are used to __func__ from gcc. */
+-#ifndef __func__
++#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)) && (!defined(__cplusplus) || (__cplusplus < 201103L)) && !defined(__func__)
+ #define __func__ __FUNCTION__
+ #endif
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cmocka.git/commitdiff/8e5c8f06d0aab835eb601f0094e334b51ec93d5a



More information about the pld-cvs-commit mailing list