[mirall] Added patch for gcc5 compliance (use of __FUNCTION__ macro)

Damien Nadé anvil at fedoraproject.org
Fri Mar 6 12:40:35 UTC 2015


commit 555b3d2c4e4034052831e41463d35556ec058703
Author: Damien Nadé <alioth at livna.org>
Date:   Fri Mar 6 13:40:29 2015 +0100

    Added patch for gcc5 compliance (use of __FUNCTION__ macro)

 mirall-1.7.1-gcc-5-FUNCTION-macro.patch | 60 +++++++++++++++++++++++++++++++++
 mirall.spec                             |  7 +++-
 2 files changed, 66 insertions(+), 1 deletion(-)
---
diff --git a/mirall-1.7.1-gcc-5-FUNCTION-macro.patch b/mirall-1.7.1-gcc-5-FUNCTION-macro.patch
new file mode 100644
index 0000000..d201875
--- /dev/null
+++ b/mirall-1.7.1-gcc-5-FUNCTION-macro.patch
@@ -0,0 +1,60 @@
+diff -u --exclude CVS --exclude .svn --exclude .bzr -r mirall-1.7.1.orig/admin/win/nsi/nsis_uac/UAC.nsh mirall-1.7.1/admin/win/nsi/nsis_uac/UAC.nsh
+--- mirall-1.7.1.orig/admin/win/nsi/nsis_uac/UAC.nsh	2014-12-18 12:45:49.000000000 +0100
++++ mirall-1.7.1/admin/win/nsi/nsis_uac/UAC.nsh	2015-03-06 13:34:02.025078434 +0100
+@@ -76,7 +76,7 @@
+ 
+ !ifmacroNdef _UAC.GenerateOnInitElevationCode
+ !macro _UAC.GenerateOnInitElevationCode _modeprefix
+-!ifndef __FUNCTION__
++!ifndef __func__
+ 	!error "UAC: Needs to be called inside a function"
+ 	!endif
+ !insertmacro _UAC.InitStrings ${_modeprefix}
+diff -u --exclude CVS --exclude .svn --exclude .bzr -r mirall-1.7.1.orig/csync/src/csync_log.h mirall-1.7.1/csync/src/csync_log.h
+--- mirall-1.7.1.orig/csync/src/csync_log.h	2014-12-18 12:45:49.000000000 +0100
++++ mirall-1.7.1/csync/src/csync_log.h	2015-03-06 13:34:01.984079301 +0100
+@@ -61,7 +61,7 @@
+ };
+ 
+ #define CSYNC_LOG(priority, ...) \
+-  csync_log(priority, __FUNCTION__, __VA_ARGS__)
++  csync_log(priority, __func__, __VA_ARGS__)
+ 
+ void csync_log(int verbosity,
+                const char *function,
+diff -u --exclude CVS --exclude .svn --exclude .bzr -r mirall-1.7.1.orig/csync/src/httpbf/src/httpbf.c mirall-1.7.1/csync/src/httpbf/src/httpbf.c
+--- mirall-1.7.1.orig/csync/src/httpbf/src/httpbf.c	2014-12-18 12:45:49.000000000 +0100
++++ mirall-1.7.1/csync/src/httpbf/src/httpbf.c	2015-03-06 13:34:01.982079344 +0100
+@@ -42,7 +42,7 @@
+ #define DEBUG_HBF(...) { if(transfer->log_cb) { \
+         char buf[1024];                         \
+         snprintf(buf, 1024, __VA_ARGS__);       \
+-        transfer->log_cb(__FUNCTION__, buf, transfer->user_data);    \
++        transfer->log_cb(__func__, buf, transfer->user_data);    \
+   }  }
+ 
+ // #endif
+diff -u --exclude CVS --exclude .svn --exclude .bzr -r mirall-1.7.1.orig/csync/tests/csync_tests/check_csync_log.c mirall-1.7.1/csync/tests/csync_tests/check_csync_log.c
+--- mirall-1.7.1.orig/csync/tests/csync_tests/check_csync_log.c	2014-12-18 12:45:49.000000000 +0100
++++ mirall-1.7.1/csync/tests/csync_tests/check_csync_log.c	2015-03-06 13:34:01.985079280 +0100
+@@ -131,7 +131,7 @@
+     rc = csync_set_log_callback(check_log_callback);
+     assert_int_equal(rc, 0);
+ 
+-    csync_log(1, __FUNCTION__, "rc = %d", rc);
++    csync_log(1, __func__, "rc = %d", rc);
+ 
+     rc = _tstat(path, &sb);
+ 
+diff -u --exclude CVS --exclude .svn --exclude .bzr -r mirall-1.7.1.orig/shell_integration/MacOSX/OwnCloudFinder/GCDAsyncSocket.m mirall-1.7.1/shell_integration/MacOSX/OwnCloudFinder/GCDAsyncSocket.m
+--- mirall-1.7.1.orig/shell_integration/MacOSX/OwnCloudFinder/GCDAsyncSocket.m	2014-12-18 12:45:49.000000000 +0100
++++ mirall-1.7.1/shell_integration/MacOSX/OwnCloudFinder/GCDAsyncSocket.m	2015-03-06 13:34:02.024078455 +0100
+@@ -87,7 +87,7 @@
+ #define LogCVerbose(frmt, ...)  LogC(LOG_FLAG_VERBOSE, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__)
+ 
+ #define LogTrace()              LogObjc(LOG_FLAG_VERBOSE, @"%@: %@", THIS_FILE, THIS_METHOD)
+-#define LogCTrace()             LogC(LOG_FLAG_VERBOSE, @"%@: %s", THIS_FILE, __FUNCTION__)
++#define LogCTrace()             LogC(LOG_FLAG_VERBOSE, @"%@: %s", THIS_FILE, __func__)
+ 
+ // Log levels : off, error, warn, info, verbose
+ static const int logLevel = LOG_LEVEL_VERBOSE;
diff --git a/mirall.spec b/mirall.spec
index 714e28f..ef3f77a 100644
--- a/mirall.spec
+++ b/mirall.spec
@@ -1,6 +1,6 @@
 Name:           mirall
 Version:        1.7.1
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        The ownCloud Client
 
 License:        GPLv2+
@@ -9,6 +9,7 @@ Source0:        http://download.owncloud.com/desktop/stable/%{name}-%{version}.t
 Patch0:         %{name}-1.7.0-syslibs.patch
 # Port of https://github.com/owncloud/mirall/pull/2104 
 Patch1:         %{name}-1.7.0-rpath.patch
+Patch2:		%{name}-1.7.1-gcc-5-FUNCTION-macro.patch
 
 BuildRequires:  cmake
 BuildRequires:  qt4-devel
@@ -76,6 +77,7 @@ The owncloud desktop client nautilus extension.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 rm -rf src/3rdparty/qtlockedfile src/3rdparty/qtsingleapplication
 
 
@@ -144,6 +146,9 @@ fi
 
 
 %changelog
+* Fri Mar  6 2015 Dams <anvil[AT]livna.org> - 1.7.1-2
+- Added gcc5 compliance patch
+
 * Fri Mar  6 2015 Dams <anvil[AT]livna.org> - 1.7.1-1
 - Updated to 1.7.1
 


More information about the scm-commits mailing list