[BZ,17956] Fix build failure due to missing definitions from header file nss/nss.h when Mozilla NSS is used for cryptography
Commit Message
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 <guido@trentalancia.net>
---
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(-)
@@ -20,7 +20,7 @@
#include <errno.h>
#include <grp.h>
#include <hesiod.h>
-#include <nss.h>
+#include <nsswitch.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -19,7 +19,7 @@
#include <errno.h>
#include <hesiod.h>
#include <pwd.h>
-#include <nss.h>
+#include <nsswitch.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -1 +1 @@
-#include <nss/nsswitch.h>
+#include "../nss/nsswitch.h"
@@ -26,6 +26,7 @@
#include <string.h>
#include <stdint.h>
#include <sys/param.h>
+#include "../nss.h"
#include "nss_db.h"
@@ -24,6 +24,7 @@
#include <unistd.h>
#include <sys/mman.h>
#include <not-cancel.h>
+#include "../nss.h"
#include "nss_db.h"
@@ -19,7 +19,7 @@
#include <alloca.h>
#include <errno.h>
#include <grp.h>
-#include <nss.h>
+#include "../nss.h"
#include <stdio_ext.h>
#include <string.h>
#include <sys/param.h>
@@ -22,7 +22,7 @@
#include <arpa/nameser.h>
#include <netinet/in.h>
-#include <nss.h>
+#include "nss.h"
#include <resolv.h>
#include <search.h>
#include <dlfcn.h>
@@ -15,7 +15,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <nss.h>
+#include "../include/nss.h"
#include <string.h>
/* Rewrite VALUE to a valid field value in the NSS database. Invalid
@@ -15,7 +15,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <nss.h>
+#include "../include/nss.h"
#include <string.h>
const char __nss_invalid_field_characters[] = NSS_INVALID_FIELD_CHARACTERS;
@@ -15,7 +15,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <nss.h>
+#include "../include/nss.h"
#include <stdbool.h>
#include <string.h>