From patchwork Mon May 5 10:34:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 345657 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id E8CA314029E for ; Mon, 5 May 2014 20:35:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C20133212B; Mon, 5 May 2014 10:35:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P8+BvvDJBDfI; Mon, 5 May 2014 10:35:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 969C03087B; Mon, 5 May 2014 10:35:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4655D1BF84E for ; Mon, 5 May 2014 10:35:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4196D8AD2D for ; Mon, 5 May 2014 10:35:36 +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 vbPkzU9go-FP for ; Mon, 5 May 2014 10:35:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by whitealder.osuosl.org (Postfix) with ESMTPS id B4FD38ACC3 for ; Mon, 5 May 2014 10:35:34 +0000 (UTC) Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id 6B6DD440707; Mon, 5 May 2014 13:35:30 +0300 (IDT) From: Baruch Siach To: buildroot@busybox.net Date: Mon, 5 May 2014 13:34:48 +0300 Message-Id: X-Mailer: git-send-email 2.0.0.rc0 Subject: [Buildroot] [PATCH] p11-kit: fix build against linuxthreads 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 Fixes: http://autobuild.buildroot.net/results/9e9/9e9c83461fec44c85919e07a3ce2c5ca49ff9cf5/ Signed-off-by: Baruch Siach --- ...ld-against-older-pthreads-implementations.patch | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 package/p11-kit/p11-kit-01-Fix-build-against-older-pthreads-implementations.patch diff --git a/package/p11-kit/p11-kit-01-Fix-build-against-older-pthreads-implementations.patch b/package/p11-kit/p11-kit-01-Fix-build-against-older-pthreads-implementations.patch new file mode 100644 index 000000000000..3562f3c2b6be --- /dev/null +++ b/package/p11-kit/p11-kit-01-Fix-build-against-older-pthreads-implementations.patch @@ -0,0 +1,64 @@ +From 05b6a7550756ffdced25a6c51cf2222bad9e59e7 Mon Sep 17 00:00:00 2001 +Message-Id: <05b6a7550756ffdced25a6c51cf2222bad9e59e7.1399285491.git.baruch@tkos.co.il> +From: Baruch Siach +Date: Mon, 5 May 2014 09:32:23 +0300 +Subject: [PATCH] Fix build against older pthreads implementations + +Older pthreads implementations like glibc NPTL prior to version 2.12, and +uClibc linuxthreads (both), need _XOPEN_SOURCE to expose +pthread_mutexattr_settype() and THREAD_MUTEX_DEFAULT. The value 600 (SuSv3, +POSIX.1-2001) is equivalent to _POSIX_C_SOURCE 200112L. + +Fixes the following build error: + + CC compat.lo +compat.c: In function 'p11_mutex_init': +compat.c:164:2: warning: implicit declaration of function 'pthread_mutexattr_settype' [-Wimplicit-function-declaration] +compat.c:164:2: warning: nested extern declaration of 'pthread_mutexattr_settype' [-Wnested-externs] +compat.c:164:36: error: 'PTHREAD_MUTEX_DEFAULT' undeclared (first use in this function) + +Patch status: sent upstream + +Signed-off-by: Baruch Siach +--- + common/compat.h | 6 ++++++ + common/message.c | 6 ------ + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/common/compat.h b/common/compat.h +index d7fe414a46bf..fbc1dc1d4f0f 100644 +--- a/common/compat.h ++++ b/common/compat.h +@@ -37,6 +37,12 @@ + + #include "config.h" + ++/* ++ * Oh god. glibc is nasty. Changes behavior and definitions of POSIX ++ * functions to completely different signatures depending on defines ++ */ ++#define _XOPEN_SOURCE 600 ++ + #include + #include + +diff --git a/common/message.c b/common/message.c +index 35f2764487a9..e68dfac561c8 100644 +--- a/common/message.c ++++ b/common/message.c +@@ -37,12 +37,6 @@ + + #include "config.h" + +-/* +- * Oh god. glibc is nasty. Changes behavior and definitions of POSIX +- * functions to completely different signatures depending on defines +- */ +-#define _POSIX_C_SOURCE 200112L +- + #include "compat.h" + #define P11_DEBUG_FLAG P11_DEBUG_LIB + #include "debug.h" +-- +2.0.0.rc0 +