From patchwork Mon May 30 19:14:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guido Trentalancia X-Patchwork-Id: 12631 Received: (qmail 43033 invoked by alias); 30 May 2016 19:14:27 -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 43023 invoked by uid 89); 30 May 2016 19:14:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL, BAYES_20, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=trentalancia, U*guido, guido, D*trentalancia.net X-HELO: authsmtp.register.it X-Rid: guido@trentalancia.net@151.76.58.157 Message-ID: <1464635653.24965.5.camel@trentalancia.net> Subject: [PATCH] [BZ 17956] Fix build failure due to missing definitions from header file nss/nss.h when Mozilla NSS is used for cryptography From: Guido Trentalancia To: libc-alpha@sourceware.org Date: Mon, 30 May 2016 21:14:13 +0200 Mime-Version: 1.0 A build failure occurs when glibc is configured with the --enable-nss-crypt option in order to use Mozilla NSS library for cryptography. Such failure is due to conflicting "nss.h" header files: one from GNU glibc and the other from the Mozilla NSS library (usually located at /usr/include/nss3/nss.h). This patch aims to fix such build failure (BZ 17956) by helping the preprocessor pick the right (local) "nss.h" header file during compilation. Signed-off-by: Guido Trentalancia --- hesiod/nss_hesiod/hesiod-grp.c | 2 +- hesiod/nss_hesiod/hesiod-pwd.c | 2 +- include/nsswitch.h | 2 +- nss/nss_db/db-initgroups.c | 1 + nss/nss_db/db-open.c | 1 + nss/nss_files/files-initgroups.c | 2 +- nss/nsswitch.h | 2 +- nss/rewrite_field.c | 2 +- nss/valid_field.c | 2 +- nss/valid_list_field.c | 2 +- 10 files changed, 10 insertions(+), 8 deletions(-) diff -pru glibc/hesiod/nss_hesiod/hesiod-grp.c glibc-30052016-2000/hesiod/nss_hesiod/hesiod-grp.c --- glibc/hesiod/nss_hesiod/hesiod-grp.c 2016-05-30 13:25:35.407697033 +0200 +++ glibc-30052016-2000/hesiod/nss_hesiod/hesiod-grp.c 2016-05-30 20:55:26.649690780 +0200 @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff -pru glibc/hesiod/nss_hesiod/hesiod-pwd.c glibc-30052016-2000/hesiod/nss_hesiod/hesiod-pwd.c --- glibc/hesiod/nss_hesiod/hesiod-pwd.c 2016-05-30 13:25:35.407697033 +0200 +++ glibc-30052016-2000/hesiod/nss_hesiod/hesiod-pwd.c 2016-05-30 20:55:40.096657000 +0200 @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff -pru glibc/include/nsswitch.h glibc-30052016-2000/include/nsswitch.h --- glibc/include/nsswitch.h 2016-05-30 13:25:35.699697966 +0200 +++ glibc-30052016-2000/include/nsswitch.h 2016-05-30 20:13:23.526750349 +0200 @@ -1 +1 @@ -#include +#include "../nss/nsswitch.h" diff -pru glibc/nss/nss_db/db-initgroups.c glibc-30052016-2000/nss/nss_db/db-initgroups.c --- glibc/nss/nss_db/db-initgroups.c 2016-05-30 13:25:36.268699785 +0200 +++ glibc-30052016-2000/nss/nss_db/db-initgroups.c 2016-05-30 20:29:49.855696425 +0200 @@ -26,6 +26,7 @@ #include #include #include +#include "../nss.h" #include "nss_db.h" diff -pru glibc/nss/nss_db/db-open.c glibc-30052016-2000/nss/nss_db/db-open.c --- glibc/nss/nss_db/db-open.c 2016-05-30 13:25:36.268699785 +0200 +++ glibc-30052016-2000/nss/nss_db/db-open.c 2016-05-30 20:29:24.877770621 +0200 @@ -24,6 +24,7 @@ #include #include #include +#include "../nss.h" #include "nss_db.h" diff -pru glibc/nss/nss_files/files-initgroups.c glibc-30052016-2000/nss/nss_files/files-initgroups.c --- glibc/nss/nss_files/files-initgroups.c 2016-05-30 13:25:36.269699788 +0200 +++ glibc-30052016-2000/nss/nss_files/files-initgroups.c 2016-05-30 20:27:39.332085182 +0200 @@ -19,7 +19,7 @@ #include #include #include -#include +#include "../nss.h" #include #include #include diff -pru glibc/nss/nsswitch.h glibc-30052016-2000/nss/nsswitch.h --- glibc/nss/nsswitch.h 2016-05-30 13:25:36.270699791 +0200 +++ glibc-30052016-2000/nss/nsswitch.h 2016-05-30 20:13:23.527750346 +0200 @@ -22,7 +22,7 @@ #include #include -#include +#include "nss.h" #include #include #include diff -pru glibc/nss/rewrite_field.c glibc-30052016-2000/nss/rewrite_field.c --- glibc/nss/rewrite_field.c 2016-05-30 13:25:36.270699791 +0200 +++ glibc-30052016-2000/nss/rewrite_field.c 2016-05-30 20:13:23.527750346 +0200 @@ -15,7 +15,7 @@ License along with the GNU C Library; if not, see . */ -#include +#include "../include/nss.h" #include /* Rewrite VALUE to a valid field value in the NSS database. Invalid diff -pru glibc/nss/valid_field.c glibc-30052016-2000/nss/valid_field.c --- glibc/nss/valid_field.c 2016-05-30 13:25:36.271699794 +0200 +++ glibc-30052016-2000/nss/valid_field.c 2016-05-30 20:13:23.527750346 +0200 @@ -15,7 +15,7 @@ License along with the GNU C Library; if not, see . */ -#include +#include "../include/nss.h" #include const char __nss_invalid_field_characters[] = NSS_INVALID_FIELD_CHARACTERS; diff -pru glibc/nss/valid_list_field.c glibc-30052016-2000/nss/valid_list_field.c --- glibc/nss/valid_list_field.c 2016-05-30 13:25:36.271699794 +0200 +++ glibc-30052016-2000/nss/valid_list_field.c 2016-05-30 20:13:23.527750346 +0200 @@ -15,7 +15,7 @@ License along with the GNU C Library; if not, see . */ -#include +#include "../include/nss.h" #include #include