From patchwork Sat Apr 7 19:11:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Korsgaard X-Patchwork-Id: 151331 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 7E3FBB705C for ; Sun, 8 Apr 2012 05:12:06 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D79708F0E3; Sat, 7 Apr 2012 19:12:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id POZT+IfnAN9e; Sat, 7 Apr 2012 19:12:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 768C38F0AB; Sat, 7 Apr 2012 19:12:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id AA4408F753 for ; Sat, 7 Apr 2012 19:11:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 98F18100EB5 for ; Sat, 7 Apr 2012 19:11:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OGo9HqBaOLho for ; Sat, 7 Apr 2012 19:11:57 +0000 (UTC) Received: from busybox.osuosl.org (busybox.osuosl.org [140.211.167.224]) by fraxinus.osuosl.org (Postfix) with ESMTP id AF082100886 for ; Sat, 7 Apr 2012 19:11:57 +0000 (UTC) Received: by busybox.osuosl.org (Postfix, from userid 4021) id A811C96A35; Sat, 7 Apr 2012 19:11:57 +0000 (UTC) From: Peter Korsgaard To: buildroot@busybox.net Date: Sat, 7 Apr 2012 21:11:30 +0200 X-Git-Refname: refs/heads/master X-Git-Oldrev: 040f6a325f7b62c178fb6d17480adbae4e42e745 X-Git-Newrev: 80c4ea47087999e4c13377aa742a8c1d9295aeba X-Patchwork-Hint: ignore Message-Id: <20120407191157.A811C96A35@busybox.osuosl.org> Subject: [Buildroot] [git commit] gnutls: fix build on uClibc with C++ support enabled X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net commit: http://git.buildroot.net/buildroot/commit/?id=80c4ea47087999e4c13377aa742a8c1d9295aeba branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master Patch from openembedded: http://git.openembedded.org/openembedded-core/plain/meta/recipes-support/gnutls/gnutls-2.12.17/correct_rpl_gettimeofday_signature.patch Signed-off-by: Peter Korsgaard --- ...gnutls-correct_rpl_gettimeofday_signature.patch | 58 ++++++++++++++++++++ 1 files changed, 58 insertions(+), 0 deletions(-) diff --git a/package/gnutls/gnutls-correct_rpl_gettimeofday_signature.patch b/package/gnutls/gnutls-correct_rpl_gettimeofday_signature.patch new file mode 100644 index 0000000..9188708 --- /dev/null +++ b/package/gnutls/gnutls-correct_rpl_gettimeofday_signature.patch @@ -0,0 +1,58 @@ +[PATCH] fix build on uClibc + +Currently we fail on uclibc like below + +| In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/ucontext.h:26, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/signal.h:392, +| from ../../gl/signal.h:52, +| from ../../gl/sys/select.h:58, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/types.h:220, +| from ../../gl/sys/types.h:28, +| from ../../lib/includes/gnutls/gnutls.h:46, +| from ex-cxx.cpp:3: +| ../../gl/sys/time.h:396:66: error: conflicting declaration 'void* restrict' +| ../../gl/sys/time.h:396:50: error: 'restrict' has a previous declaration as 'timeval* restrict' +| make[4]: *** [ex-cxx.o] Error 1 +| make[4]: *** Waiting for unfinished jobs.... + + +GCC detects that we call 'restrict' as param name in function +signatures and complains since both params are called 'restrict' +therefore we use __restrict to denote the C99 keywork + +This only happens of uclibc since this code is not excercised with +eglibc otherwise we will have same issue there too + +Signed-off-by: Khem Raj +Signed-off-by: Peter Korsgaard + +Index: gnutls-2.12.14/gl/sys_time.in.h +=================================================================== +--- gnutls-2.12.14.orig/gl/sys_time.in.h 2012-01-15 10:54:39.517285351 -0800 ++++ gnutls-2.12.14/gl/sys_time.in.h 2012-01-15 10:59:23.773299108 -0800 +@@ -82,20 +82,20 @@ + # define gettimeofday rpl_gettimeofday + # endif + _GL_FUNCDECL_RPL (gettimeofday, int, +- (struct timeval *restrict, void *restrict) ++ (struct timeval *__restrict, void *__restrict) + _GL_ARG_NONNULL ((1))); + _GL_CXXALIAS_RPL (gettimeofday, int, +- (struct timeval *restrict, void *restrict)); ++ (struct timeval *__restrict, void *__restrict)); + # else + # if !@HAVE_GETTIMEOFDAY@ + _GL_FUNCDECL_SYS (gettimeofday, int, +- (struct timeval *restrict, void *restrict) ++ (struct timeval *__restrict, void *__restrict) + _GL_ARG_NONNULL ((1))); + # endif + /* Need to cast, because on glibc systems, by default, the second argument is + struct timezone *. */ + _GL_CXXALIAS_SYS_CAST (gettimeofday, int, +- (struct timeval *restrict, void *restrict)); ++ (struct timeval *__restrict, void *__restrict)); + # endif + _GL_CXXALIASWARN (gettimeofday); + # elif defined GNULIB_POSIXCHECK