Date: Saturday, May 30, 2015 @ 10:42:30 Author: arojas Revision: 134339
Fix build with GCC 5 Added: owncloud-client/trunk/gcc-5.patch Modified: owncloud-client/trunk/PKGBUILD -------------+ PKGBUILD | 11 ++++++++--- gcc-5.patch | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2015-05-30 08:30:54 UTC (rev 134338) +++ PKGBUILD 2015-05-30 08:42:30 UTC (rev 134339) @@ -5,7 +5,7 @@ _name=owncloudclient pkgname=owncloud-client pkgver=1.8.1 -pkgrel=1 +pkgrel=2 pkgdesc='ownCloud client based on mirall' arch=(i686 x86_64) url='http://owncloud.org/' @@ -15,13 +15,18 @@ optdepends=('python2-nautilus: integration with Nautilus') install=$pkgname.install backup=('etc/ownCloud/sync-exclude.lst') -source=("https://download.owncloud.com/desktop/stable/$_name-$pkgver.tar.xz"{,.asc}) +source=("https://download.owncloud.com/desktop/stable/$_name-$pkgver.tar.xz"{,.asc} 'gcc-5.patch') md5sums=('94c38c8cc15f2e34fae49e06ee3dc66e' - 'SKIP') + 'SKIP' + '1f6cc012ba0fb8517097c73cdb59560e') validpgpkeys=('F05F7DD7953A07DF36579DAA498C45EBE94E7B37') prepare() { mkdir -p build + +# Fix build with GCC 5 + cd $_name-$pkgver + patch -p1 -i "$srcdir"/gcc-5.patch } build() { Added: gcc-5.patch =================================================================== --- gcc-5.patch (rev 0) +++ gcc-5.patch 2015-05-30 08:42:30 UTC (rev 134339) @@ -0,0 +1,57 @@ +From 23b6426dfa1a17b05860c3a9e0ce08c4cd45b64b Mon Sep 17 00:00:00 2001 +From: Hefee <[email protected]> +Date: Thu, 7 May 2015 01:15:55 +0200 +Subject: [PATCH] Compile with GCC 5 + +this fixes the error and makes complete oCC compile with GCC 5. +error: ISO C does not support '__FUNCTION__' predefined identifier +[-Wpedantic] + +According to the porting guide: +The fix is either to use the standard predefined identifier __func__ +(since C99), or to use the __extension__ keyword. +--- + csync/src/csync_log.h | 2 +- + csync/src/httpbf/src/httpbf.c | 2 +- + csync/tests/csync_tests/check_csync_log.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/csync/src/csync_log.h b/csync/src/csync_log.h +index 38f5f9c..0cd0d01 100644 +--- a/csync/src/csync_log.h ++++ b/csync/src/csync_log.h +@@ -61,7 +61,7 @@ enum csync_log_priority_e { + }; + + #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 --git a/csync/src/httpbf/src/httpbf.c b/csync/src/httpbf/src/httpbf.c +index 815b07e..2489e8d 100644 +--- a/csync/src/httpbf/src/httpbf.c ++++ b/csync/src/httpbf/src/httpbf.c +@@ -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 --git a/csync/tests/csync_tests/check_csync_log.c b/csync/tests/csync_tests/check_csync_log.c +index 4c88c14..65a8ae9 100644 +--- a/csync/tests/csync_tests/check_csync_log.c ++++ b/csync/tests/csync_tests/check_csync_log.c +@@ -131,7 +131,7 @@ static void check_logging(void **state) + 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); +
