From patchwork Tue May 31 12:09:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guido Trentalancia X-Patchwork-Id: 628220 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rJskG2P8Dz9sDb for ; Tue, 31 May 2016 22:09:57 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=S4c0DBeA; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:subject:from:to:date:content-type :mime-version:content-transfer-encoding; q=dns; s=default; b=JSo 7vvFJs3CazxKSGqMPH5xZixTITb+bnP4ZCbckJVdE9esx+B/HOgVZdj9XwZwO8is +e11sFVZfO4vQfQx7q5q/YkQ9E6EayK+Jw8MyVQdwhWwbfrU9oqFkbDPU3NQJkfD DxQuBcjMCJ8/LrGgwI93YEPIW+xz/gwcs9Ja2fCw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:subject:from:to:date:content-type :mime-version:content-transfer-encoding; s=default; bh=eHNThbg9l ZED41Xlx5nxC6N5zOo=; b=S4c0DBeA1h7ft4ifVNtFgCAK/rGNPnoWRTgGxhvKC NYnr5dJj3vl7S6RtuRLp1QwbmZkPNERH4jGXMDuYKScQxndTfNeR/4aaz8R01QnA /I+zetCro4vdWUuliNxbLfjs+wRKPXFC/28QJdJ/4ig/Xs7EiKpjhCjjI3cRIqwR lg= Received: (qmail 124775 invoked by alias); 31 May 2016 12:09:51 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 124765 invoked by uid 89); 31 May 2016 12:09:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=includedir, Hx-languages-length:1782, sk:guido@t, nspr X-HELO: authsmtp.register.it X-Rid: guido@trentalancia.net@151.76.58.157 Message-ID: <1464696577.24965.16.camel@trentalancia.net> Subject: [PATCH] When using the Mozilla NSS library for cryptography, include the NSPR header files From: Guido Trentalancia To: GLIBC Devel Date: Tue, 31 May 2016 14:09:37 +0200 Mime-Version: 1.0 When configuring GNU libc to build using the Mozilla NSS library for cryptography (--enable-nss-crypt option), also include the NSPR header files along with the Mozilla NSS library header files. Signed-off-by: Guido Trentalancia --- configure | 6 +++++- configure.ac | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) --- glibc-31052016-0900GMT/configure 2016-05-30 13:25:35.299696688 +0200 +++ glibc-configure-nss-crypt-include-nspr-headers/configure 2016-05-31 13:57:28.117571376 +0200 @@ -3501,8 +3501,12 @@ if test x$nss_crypt = xyes; then if test $? -ne 0; then as_fn_error $? "cannot find include directory with nss-config" "$LINENO" 5 fi + nspr_includes=-I$(nspr-config --includedir 2>/dev/null) + if test $? -ne 0; then + as_fn_error $? "cannot find include directory with nspr-config" "$LINENO" 5 + fi old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $nss_includes" + CFLAGS="$CFLAGS $nss_includes $nspr_includes" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --- glibc-31052016-0900GMT/configure.ac 2016-05-30 13:25:35.299696688 +0200 +++ glibc-configure-nss-crypt-include-nspr-headers/configure.ac 2016-05-31 13:58:03.962731844 +0200 @@ -311,8 +311,12 @@ if test x$nss_crypt = xyes; then if test $? -ne 0; then AC_MSG_ERROR([cannot find include directory with nss-config]) fi + nspr_includes=-I$(nspr-config --includedir 2>/dev/null) + if test $? -ne 0; then + AC_MSG_ERROR([cannot find include directory with nspr-config]) + fi old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $nss_includes" + CFLAGS="$CFLAGS $nss_includes $nspr_includes" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([typedef int PRBool; #include #include