This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] [BZ 17956] Fix nss tests build failure due to missing definitions from header file nss.h when Mozilla NSS is used
- From: Guido Trentalancia <guido at trentalancia dot net>
- To: libc-alpha at sourceware dot org
- Date: Mon, 30 May 2016 23:10:13 +0200
- Subject: [PATCH] [BZ 17956] Fix nss tests build failure due to missing definitions from header file nss.h when Mozilla NSS is used
- Authentication-results: sourceware.org; auth=none
- References: <1464635653 dot 24965 dot 5 dot camel at trentalancia dot net>
A build failure occurs when glibc is configured with the --enable-nss-crypt
option in order to use Mozilla NSS library for cryptography and the
tests are built and executed by running "make check".
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
of the tests.
Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
---
nss/nss_test1.c | 2 +-
nss/tst-field.c | 2 +-
nss/tst-nss-test1.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff -pru glibc-30052016-2000-nss-include-fixes/nss/nss_test1.c glibc-30052016-2000-nss-include-fixes-nss-tests/nss/nss_test1.c
--- glibc-30052016-2000-nss-include-fixes/nss/nss_test1.c 2016-05-30 13:25:36.270699791 +0200
+++ glibc-30052016-2000-nss-include-fixes-nss-tests/nss/nss_test1.c 2016-05-30 22:57:07.014001099 +0200
@@ -1,5 +1,5 @@
#include <errno.h>
-#include <nss.h>
+#include "nss.h"
#include <pthread.h>
#include <string.h>
diff -pru glibc-30052016-2000-nss-include-fixes/nss/tst-field.c glibc-30052016-2000-nss-include-fixes-nss-tests/nss/tst-field.c
--- glibc-30052016-2000-nss-include-fixes/nss/tst-field.c 2016-05-30 13:25:36.271699794 +0200
+++ glibc-30052016-2000-nss-include-fixes-nss-tests/nss/tst-field.c 2016-05-30 22:57:35.364966665 +0200
@@ -19,7 +19,7 @@
/* This test needs to be statically linked because it access hidden
functions. */
-#include <nss.h>
+#include "nss.h"
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
diff -pru glibc-30052016-2000-nss-include-fixes/nss/tst-nss-test1.c glibc-30052016-2000-nss-include-fixes-nss-tests/nss/tst-nss-test1.c
--- glibc-30052016-2000-nss-include-fixes/nss/tst-nss-test1.c 2016-05-30 13:25:36.271699794 +0200
+++ glibc-30052016-2000-nss-include-fixes-nss-tests/nss/tst-nss-test1.c 2016-05-30 22:57:51.168947430 +0200
@@ -1,4 +1,4 @@
-#include <nss.h>
+#include "nss.h"
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>