[v2,BZ,17956] Fix build failure due to missing definitions from header file nss/nss.h when Mozilla NSS is used for cryptography

Message ID 1464700854.24965.21.camel@trentalancia.net
State New, archived
Headers

Commit Message

Guido Trentalancia May 31, 2016, 1:20 p.m. UTC
  A build failure might occur 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).

For example, a build configuration that leads to the occurrence of this
bug includes passing the Mozilla NSS library headers full path to the
preprocessor using CPPFLAGS.

This patch aims to fix such build failure (BZ 17956) by helping the
preprocessor pick the right (local) "nss.h" header file during compilation.

This new version includes amendments to both source and test files (in a
unique patch instead of two separate patches).

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
---
 grp/fgetgrent_r.c                    |    2 +-
 grp/getgrgid_r.c                     |    2 +-
 grp/getgrnam_r.c                     |    2 +-
 grp/putgrent.c                       |    2 +-
 gshadow/fgetsgent_r.c                |    2 +-
 gshadow/putsgent.c                   |    2 +-
 gshadow/sgetsgent_r.c                |    2 +-
 hesiod/nss_hesiod/hesiod-grp.c       |    4 ++--
 hesiod/nss_hesiod/hesiod-proto.c     |    4 ++--
 hesiod/nss_hesiod/hesiod-pwd.c       |    4 ++--
 hesiod/nss_hesiod/hesiod-service.c   |    4 ++--
 include/nss.h                        |    2 +-
 include/nsswitch.h                   |    2 +-
 include/pwd.h                        |    2 +-
 inet/ether_ntoh.c                    |    2 +-
 inet/gethstbynm.c                    |    2 +-
 nis/nss_compat/compat-grp.c          |    4 ++--
 nis/nss_compat/compat-initgroups.c   |    4 ++--
 nis/nss_compat/compat-pwd.c          |    4 ++--
 nis/nss_compat/compat-spwd.c         |    4 ++--
 nis/nss_nis/nis-alias.c              |    2 +-
 nis/nss_nis/nis-ethers.c             |    4 ++--
 nis/nss_nis/nis-grp.c                |    4 ++--
 nis/nss_nis/nis-hosts.c              |    4 ++--
 nis/nss_nis/nis-initgroups.c         |    4 ++--
 nis/nss_nis/nis-netgrp.c             |    2 +-
 nis/nss_nis/nis-network.c            |    4 ++--
 nis/nss_nis/nis-proto.c              |    4 ++--
 nis/nss_nis/nis-publickey.c          |    2 +-
 nis/nss_nis/nis-pwd.c                |    4 ++--
 nis/nss_nis/nis-rpc.c                |    4 ++--
 nis/nss_nis/nis-service.c            |    4 ++--
 nis/nss_nis/nis-spwd.c               |    4 ++--
 nis/nss_nisplus/nisplus-alias.c      |    2 +-
 nis/nss_nisplus/nisplus-ethers.c     |    2 +-
 nis/nss_nisplus/nisplus-grp.c        |    2 +-
 nis/nss_nisplus/nisplus-hosts.c      |    2 +-
 nis/nss_nisplus/nisplus-initgroups.c |    2 +-
 nis/nss_nisplus/nisplus-netgrp.c     |    2 +-
 nis/nss_nisplus/nisplus-network.c    |    2 +-
 nis/nss_nisplus/nisplus-proto.c      |    2 +-
 nis/nss_nisplus/nisplus-publickey.c  |    2 +-
 nis/nss_nisplus/nisplus-pwd.c        |    2 +-
 nis/nss_nisplus/nisplus-rpc.c        |    2 +-
 nis/nss_nisplus/nisplus-service.c    |    2 +-
 nis/nss_nisplus/nisplus-spwd.c       |    2 +-
 nscd/aicache.c                       |    2 +-
 nscd/getgrgid_r.c                    |    2 +-
 nscd/getgrnam_r.c                    |    2 +-
 nscd/getpwnam_r.c                    |    2 +-
 nscd/getpwuid_r.c                    |    2 +-
 nss/nss_db/db-initgroups.c           |    1 +
 nss/nss_db/db-open.c                 |    1 +
 nss/nss_db/nss_db.h                  |    2 +-
 nss/nss_files/files-initgroups.c     |    2 +-
 nss/nss_test1.c                      |    2 +-
 nss/nsswitch.h                       |    2 +-
 nss/rewrite_field.c                  |    2 +-
 nss/tst-field.c                      |    2 +-
 nss/tst-nss-test1.c                  |    2 +-
 nss/valid_field.c                    |    2 +-
 nss/valid_list_field.c               |    2 +-
 pwd/fgetpwent_r.c                    |    2 +-
 pwd/getpwnam_r.c                     |    2 +-
 pwd/getpwuid_r.c                     |    2 +-
 pwd/putpwent.c                       |    2 +-
 shadow/fgetspent_r.c                 |    2 +-
 shadow/putspent.c                    |    2 +-
 shadow/sgetspent_r.c                 |    2 +-
 sysdeps/posix/getaddrinfo.c          |    2 +-
 70 files changed, 88 insertions(+), 86 deletions(-)
  

Comments

Adhemerval Zanella Netto May 31, 2016, 3:09 p.m. UTC | #1
On 31/05/2016 10:20, Guido Trentalancia wrote:
> A build failure might occur 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).
> 
> For example, a build configuration that leads to the occurrence of this
> bug includes passing the Mozilla NSS library headers full path to the
> preprocessor using CPPFLAGS.
> 
> This patch aims to fix such build failure (BZ 17956) by helping the
> preprocessor pick the right (local) "nss.h" header file during compilation.
> 
> This new version includes amendments to both source and test files (in a
> unique patch instead of two separate patches).

This is missing a proper ChangeLog [1]

Besides that I am not following this patch.  The only function defined in
nss/nss.h is __nss_configure_lookup along with some other internal defines
(NSS_STATUS_*).  The ABI from libnss3 nss.h file is completely different
I am not seeing how we can just replace its inclusion.

My understanding is trying to building using configured provided CPPFLAGS
defies the proper configure check plus makefile rules that uses system
provides nss-config and nspr-config commands to get the very include
and library directories (and as you pointed out in a earlier message
it seems also broken [2]).

So I think the proper way to re-enable external nss build is first correct
the configure checks and instead of passing the external flags through
CPPFLAGS, to make sure the intended nss-config/nspr-config are on PATH
for both configure check and makefile rule generation to get the correct
flags.

[1] https://sourceware.org/glibc/wiki/Contribution%20checklist#Properly_Formatted_GNU_ChangeLog
[2] https://sourceware.org/ml/libc-alpha/2016-05/msg00746.html

> 
> Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
> ---
>  grp/fgetgrent_r.c                    |    2 +-
>  grp/getgrgid_r.c                     |    2 +-
>  grp/getgrnam_r.c                     |    2 +-
>  grp/putgrent.c                       |    2 +-
>  gshadow/fgetsgent_r.c                |    2 +-
>  gshadow/putsgent.c                   |    2 +-
>  gshadow/sgetsgent_r.c                |    2 +-
>  hesiod/nss_hesiod/hesiod-grp.c       |    4 ++--
>  hesiod/nss_hesiod/hesiod-proto.c     |    4 ++--
>  hesiod/nss_hesiod/hesiod-pwd.c       |    4 ++--
>  hesiod/nss_hesiod/hesiod-service.c   |    4 ++--
>  include/nss.h                        |    2 +-
>  include/nsswitch.h                   |    2 +-
>  include/pwd.h                        |    2 +-
>  inet/ether_ntoh.c                    |    2 +-
>  inet/gethstbynm.c                    |    2 +-
>  nis/nss_compat/compat-grp.c          |    4 ++--
>  nis/nss_compat/compat-initgroups.c   |    4 ++--
>  nis/nss_compat/compat-pwd.c          |    4 ++--
>  nis/nss_compat/compat-spwd.c         |    4 ++--
>  nis/nss_nis/nis-alias.c              |    2 +-
>  nis/nss_nis/nis-ethers.c             |    4 ++--
>  nis/nss_nis/nis-grp.c                |    4 ++--
>  nis/nss_nis/nis-hosts.c              |    4 ++--
>  nis/nss_nis/nis-initgroups.c         |    4 ++--
>  nis/nss_nis/nis-netgrp.c             |    2 +-
>  nis/nss_nis/nis-network.c            |    4 ++--
>  nis/nss_nis/nis-proto.c              |    4 ++--
>  nis/nss_nis/nis-publickey.c          |    2 +-
>  nis/nss_nis/nis-pwd.c                |    4 ++--
>  nis/nss_nis/nis-rpc.c                |    4 ++--
>  nis/nss_nis/nis-service.c            |    4 ++--
>  nis/nss_nis/nis-spwd.c               |    4 ++--
>  nis/nss_nisplus/nisplus-alias.c      |    2 +-
>  nis/nss_nisplus/nisplus-ethers.c     |    2 +-
>  nis/nss_nisplus/nisplus-grp.c        |    2 +-
>  nis/nss_nisplus/nisplus-hosts.c      |    2 +-
>  nis/nss_nisplus/nisplus-initgroups.c |    2 +-
>  nis/nss_nisplus/nisplus-netgrp.c     |    2 +-
>  nis/nss_nisplus/nisplus-network.c    |    2 +-
>  nis/nss_nisplus/nisplus-proto.c      |    2 +-
>  nis/nss_nisplus/nisplus-publickey.c  |    2 +-
>  nis/nss_nisplus/nisplus-pwd.c        |    2 +-
>  nis/nss_nisplus/nisplus-rpc.c        |    2 +-
>  nis/nss_nisplus/nisplus-service.c    |    2 +-
>  nis/nss_nisplus/nisplus-spwd.c       |    2 +-
>  nscd/aicache.c                       |    2 +-
>  nscd/getgrgid_r.c                    |    2 +-
>  nscd/getgrnam_r.c                    |    2 +-
>  nscd/getpwnam_r.c                    |    2 +-
>  nscd/getpwuid_r.c                    |    2 +-
>  nss/nss_db/db-initgroups.c           |    1 +
>  nss/nss_db/db-open.c                 |    1 +
>  nss/nss_db/nss_db.h                  |    2 +-
>  nss/nss_files/files-initgroups.c     |    2 +-
>  nss/nss_test1.c                      |    2 +-
>  nss/nsswitch.h                       |    2 +-
>  nss/rewrite_field.c                  |    2 +-
>  nss/tst-field.c                      |    2 +-
>  nss/tst-nss-test1.c                  |    2 +-
>  nss/valid_field.c                    |    2 +-
>  nss/valid_list_field.c               |    2 +-
>  pwd/fgetpwent_r.c                    |    2 +-
>  pwd/getpwnam_r.c                     |    2 +-
>  pwd/getpwuid_r.c                     |    2 +-
>  pwd/putpwent.c                       |    2 +-
>  shadow/fgetspent_r.c                 |    2 +-
>  shadow/putspent.c                    |    2 +-
>  shadow/sgetspent_r.c                 |    2 +-
>  sysdeps/posix/getaddrinfo.c          |    2 +-
>  70 files changed, 88 insertions(+), 86 deletions(-)
> 
> diff -pru glibc/grp/fgetgrent_r.c glibc-31052016-0900GMT/grp/fgetgrent_r.c
> --- glibc/grp/fgetgrent_r.c	2016-05-30 13:25:35.403697020 +0200
> +++ glibc-31052016-0900GMT/grp/fgetgrent_r.c	2016-05-31 10:26:09.912895303 +0200
> @@ -33,7 +33,7 @@ struct grent_data {};
>  
>  #define TRAILING_LIST_MEMBER		gr_mem
>  #define TRAILING_LIST_SEPARATOR_P(c)	((c) == ',')
> -#include <nss/nss_files/files-parse.c>
> +#include "../nss/nss_files/files-parse.c"
>  LINE_PARSER
>  (,
>   STRING_FIELD (result->gr_name, ISCOLON, 0);
> diff -pru glibc/grp/getgrgid_r.c glibc-31052016-0900GMT/grp/getgrgid_r.c
> --- glibc/grp/getgrgid_r.c	2016-05-30 13:25:35.403697020 +0200
> +++ glibc-31052016-0900GMT/grp/getgrgid_r.c	2016-05-31 10:25:34.494630502 +0200
> @@ -29,4 +29,4 @@
>  #define DEEPCOPY_FN	__copy_grp
>  #define MERGE_FN	__merge_grp
>  
> -#include <nss/getXXbyYY_r.c>
> +#include "../nss/getXXbyYY_r.c"
> diff -pru glibc/grp/getgrnam_r.c glibc-31052016-0900GMT/grp/getgrnam_r.c
> --- glibc/grp/getgrnam_r.c	2016-05-30 13:25:35.404697023 +0200
> +++ glibc-31052016-0900GMT/grp/getgrnam_r.c	2016-05-31 10:25:52.658252852 +0200
> @@ -29,4 +29,4 @@
>  #define DEEPCOPY_FN	__copy_grp
>  #define MERGE_FN	__merge_grp
>  
> -#include <nss/getXXbyYY_r.c>
> +#include "../nss/getXXbyYY_r.c"
> diff -pru glibc/grp/putgrent.c glibc-31052016-0900GMT/grp/putgrent.c
> --- glibc/grp/putgrent.c	2016-05-30 13:25:35.404697023 +0200
> +++ glibc-31052016-0900GMT/grp/putgrent.c	2016-05-31 11:32:52.669065354 +0200
> @@ -16,7 +16,7 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #include <errno.h>
> -#include <nss.h>
> +#include "../include/nss.h"
>  #include <stdio.h>
>  #include <string.h>
>  #include <grp.h>
> diff -pru glibc/gshadow/fgetsgent_r.c glibc-31052016-0900GMT/gshadow/fgetsgent_r.c
> --- glibc/gshadow/fgetsgent_r.c	2016-05-30 13:25:35.405697027 +0200
> +++ glibc-31052016-0900GMT/gshadow/fgetsgent_r.c	2016-05-31 10:24:58.422384367 +0200
> @@ -28,7 +28,7 @@
>  #define	EXTERN_PARSER	1
>  struct sgent_data {};
>  
> -#include <nss/nss_files/files-parse.c>
> +#include "../nss/nss_files/files-parse.c"
>  
>  
>  /* Read one shadow entry from the given stream.  */
> diff -pru glibc/gshadow/putsgent.c glibc-31052016-0900GMT/gshadow/putsgent.c
> --- glibc/gshadow/putsgent.c	2016-05-30 13:25:35.406697030 +0200
> +++ glibc-31052016-0900GMT/gshadow/putsgent.c	2016-05-31 11:32:04.859911596 +0200
> @@ -19,7 +19,7 @@
>  #include <stdbool.h>
>  #include <stdio.h>
>  #include <gshadow.h>
> -#include <nss.h>
> +#include "../include/nss.h"
>  
>  #define _S(x)	x ? x : ""
>  
> diff -pru glibc/gshadow/sgetsgent_r.c glibc-31052016-0900GMT/gshadow/sgetsgent_r.c
> --- glibc/gshadow/sgetsgent_r.c	2016-05-30 13:25:35.406697030 +0200
> +++ glibc-31052016-0900GMT/gshadow/sgetsgent_r.c	2016-05-31 10:24:11.361375682 +0200
> @@ -31,7 +31,7 @@ struct sgent_data {};
>  
>  #define TRAILING_LIST_MEMBER		sg_mem
>  #define TRAILING_LIST_SEPARATOR_P(c)	((c) == ',')
> -#include <nss/nss_files/files-parse.c>
> +#include "../nss/nss_files/files-parse.c"
>  LINE_PARSER
>  (,
>   STRING_FIELD (result->sg_namp, ISCOLON, 0);
> diff -pru glibc/hesiod/nss_hesiod/hesiod-grp.c glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-grp.c
> --- glibc/hesiod/nss_hesiod/hesiod-grp.c	2016-05-30 13:25:35.407697033 +0200
> +++ glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-grp.c	2016-05-31 10:30:48.335283621 +0200
> @@ -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>
> @@ -30,7 +30,7 @@
>  #define ENTNAME grent
>  #define STRUCTURE group
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  enum nss_status
>  _nss_hesiod_setgrent (int stayopen)
> diff -pru glibc/hesiod/nss_hesiod/hesiod-proto.c glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-proto.c
> --- glibc/hesiod/nss_hesiod/hesiod-proto.c	2016-05-30 13:25:35.407697033 +0200
> +++ glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-proto.c	2016-05-31 10:30:30.381636721 +0200
> @@ -20,7 +20,7 @@
>  #include <hesiod.h>
>  #include <netdb.h>
>  #include <netinet/in.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> @@ -35,7 +35,7 @@ struct protoent_data {};
>  
>  #define TRAILING_LIST_MEMBER		p_aliases
>  #define TRAILING_LIST_SEPARATOR_P	isspace
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  LINE_PARSER
>  ("#",
>   STRING_FIELD (result->p_name, isspace, 1);
> diff -pru glibc/hesiod/nss_hesiod/hesiod-pwd.c glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-pwd.c
> --- glibc/hesiod/nss_hesiod/hesiod-pwd.c	2016-05-30 13:25:35.407697033 +0200
> +++ glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-pwd.c	2016-05-31 10:29:58.128274035 +0200
> @@ -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>
> @@ -28,7 +28,7 @@
>  #define ENTNAME pwent
>  #define STRUCTURE passwd
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  enum nss_status
>  _nss_hesiod_setpwent (int stayopen)
> diff -pru glibc/hesiod/nss_hesiod/hesiod-service.c glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-service.c
> --- glibc/hesiod/nss_hesiod/hesiod-service.c	2016-05-30 13:25:35.407697033 +0200
> +++ glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-service.c	2016-05-31 10:31:14.667767864 +0200
> @@ -20,7 +20,7 @@
>  #include <hesiod.h>
>  #include <netdb.h>
>  #include <netinet/in.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> @@ -34,7 +34,7 @@ struct servent_data {};
>  
>  #define TRAILING_LIST_MEMBER		s_aliases
>  #define TRAILING_LIST_SEPARATOR_P	isspace
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  #define ISSC_OR_SPACE(c)	((c) ==  ';' || isspace (c))
>  LINE_PARSER
>  ("#",
> diff -pru glibc/include/nss.h glibc-31052016-0900GMT/include/nss.h
> --- glibc/include/nss.h	2016-05-30 13:25:35.699697966 +0200
> +++ glibc-31052016-0900GMT/include/nss.h	2016-05-31 10:11:23.970762863 +0200
> @@ -1,5 +1,5 @@
>  #ifndef _NSS_H
> -#include <nss/nss.h>
> +#include "../nss/nss.h"
>  
>  #define NSS_INVALID_FIELD_CHARACTERS ":\n"
>  extern const char __nss_invalid_field_characters[] attribute_hidden;
> diff -pru glibc/include/nsswitch.h glibc-31052016-0900GMT/include/nsswitch.h
> --- glibc/include/nsswitch.h	2016-05-30 13:25:35.699697966 +0200
> +++ glibc-31052016-0900GMT/include/nsswitch.h	2016-05-31 10:11:23.968762911 +0200
> @@ -1 +1 @@
> -#include <nss/nsswitch.h>
> +#include "../nss/nsswitch.h"
> diff -pru glibc/include/pwd.h glibc-31052016-0900GMT/include/pwd.h
> --- glibc/include/pwd.h	2016-05-30 13:25:35.700697969 +0200
> +++ glibc-31052016-0900GMT/include/pwd.h	2016-05-31 10:32:21.816464031 +0200
> @@ -24,7 +24,7 @@ extern int __fgetpwent_r (FILE * __strea
>  			  char *__buffer, size_t __buflen,
>  			  struct passwd **__result);
>  
> -#include <nss.h>
> +#include "../include/nss.h"
>  
>  struct parser_data;
>  extern int _nss_files_parse_pwent (char *line, struct passwd *result,
> diff -pru glibc/inet/ether_ntoh.c glibc-31052016-0900GMT/inet/ether_ntoh.c
> --- glibc/inet/ether_ntoh.c	2016-05-30 13:25:35.709697998 +0200
> +++ glibc-31052016-0900GMT/inet/ether_ntoh.c	2016-05-31 10:28:07.175496023 +0200
> @@ -21,7 +21,7 @@
>  #include <netinet/if_ether.h>
>  #include <string.h>
>  
> -#include <nss/nsswitch.h>
> +#include "../nss/nsswitch.h"
>  
>  
>  /* Type of the lookup function we need here.  */
> diff -pru glibc/inet/gethstbynm.c glibc-31052016-0900GMT/inet/gethstbynm.c
> --- glibc/inet/gethstbynm.c	2016-05-30 13:25:35.709697998 +0200
> +++ glibc-31052016-0900GMT/inet/gethstbynm.c	2016-05-31 10:27:40.359040040 +0200
> @@ -34,4 +34,4 @@
>  
>  #define HANDLE_DIGITS_DOTS	1
>  
> -#include <nss/getXXbyYY.c>
> +#include "../nss/getXXbyYY.c"
> diff -pru glibc/nis/nss_compat/compat-grp.c glibc-31052016-0900GMT/nis/nss_compat/compat-grp.c
> --- glibc/nis/nss_compat/compat-grp.c	2016-05-30 13:25:36.201699571 +0200
> +++ glibc-31052016-0900GMT/nis/nss_compat/compat-grp.c	2016-05-31 10:39:49.413172409 +0200
> @@ -20,7 +20,7 @@
>  #include <errno.h>
>  #include <fcntl.h>
>  #include <grp.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <nsswitch.h>
>  #include <stdio_ext.h>
>  #include <string.h>
> @@ -44,7 +44,7 @@ static enum nss_status (*nss_endgrent) (
>  #define ENTNAME grent
>  #define STRUCTURE group
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  /* Structure for remembering -group members ... */
>  #define BLACKLIST_INITIAL_SIZE 512
> diff -pru glibc/nis/nss_compat/compat-initgroups.c glibc-31052016-0900GMT/nis/nss_compat/compat-initgroups.c
> --- glibc/nis/nss_compat/compat-initgroups.c	2016-05-30 13:25:36.202699574 +0200
> +++ glibc-31052016-0900GMT/nis/nss_compat/compat-initgroups.c	2016-05-31 10:39:31.480491781 +0200
> @@ -20,7 +20,7 @@
>  #include <errno.h>
>  #include <fcntl.h>
>  #include <grp.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <stdio_ext.h>
>  #include <string.h>
>  #include <unistd.h>
> @@ -55,7 +55,7 @@ __libc_lock_define_initialized (static,
>  #define ENTNAME grent
>  #define STRUCTURE group
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  /* Structure for remembering -group members ... */
>  #define BLACKLIST_INITIAL_SIZE 512
> diff -pru glibc/nis/nss_compat/compat-pwd.c glibc-31052016-0900GMT/nis/nss_compat/compat-pwd.c
> --- glibc/nis/nss_compat/compat-pwd.c	2016-05-30 13:25:36.202699574 +0200
> +++ glibc-31052016-0900GMT/nis/nss_compat/compat-pwd.c	2016-05-31 10:40:20.933613540 +0200
> @@ -20,7 +20,7 @@
>  #include <errno.h>
>  #include <fcntl.h>
>  #include <netdb.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <nsswitch.h>
>  #include <pwd.h>
>  #include <stdio_ext.h>
> @@ -48,7 +48,7 @@ static enum nss_status (*nss_endpwent) (
>  #define ENTNAME pwent
>  #define STRUCTURE passwd
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  /* Structure for remembering -@netgroup and -user members ... */
>  #define BLACKLIST_INITIAL_SIZE 512
> diff -pru glibc/nis/nss_compat/compat-spwd.c glibc-31052016-0900GMT/nis/nss_compat/compat-spwd.c
> --- glibc/nis/nss_compat/compat-spwd.c	2016-05-30 13:25:36.202699574 +0200
> +++ glibc-31052016-0900GMT/nis/nss_compat/compat-spwd.c	2016-05-31 10:40:04.766899786 +0200
> @@ -20,7 +20,7 @@
>  #include <errno.h>
>  #include <fcntl.h>
>  #include <netdb.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <nsswitch.h>
>  #include <shadow.h>
>  #include <stdio_ext.h>
> @@ -45,7 +45,7 @@ static enum nss_status (*nss_endspent) (
>  #define ENTNAME spent
>  #define STRUCTURE spwd
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  /* Structure for remembering -@netgroup and -user members ... */
>  #define BLACKLIST_INITIAL_SIZE 512
> diff -pru glibc/nis/nss_nis/nis-alias.c glibc-31052016-0900GMT/nis/nss_nis/nis-alias.c
> --- glibc/nis/nss_nis/nis-alias.c	2016-05-30 13:25:36.202699574 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-alias.c	2016-05-31 10:17:03.363813921 +0200
> @@ -16,7 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <ctype.h>
>  #include <errno.h>
>  #include <string.h>
> diff -pru glibc/nis/nss_nis/nis-ethers.c glibc-31052016-0900GMT/nis/nss_nis/nis-ethers.c
> --- glibc/nis/nss_nis/nis-ethers.c	2016-05-30 13:25:36.202699574 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-ethers.c	2016-05-31 10:38:45.111322402 +0200
> @@ -16,7 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <ctype.h>
>  #include <errno.h>
>  #include <string.h>
> @@ -35,7 +35,7 @@ __libc_lock_define_initialized (static,
>  #define ENTNAME etherent
>  #define STRUCTURE etherent
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  struct response
>  {
> diff -pru glibc/nis/nss_nis/nis-grp.c glibc-31052016-0900GMT/nis/nss_nis/nis-grp.c
> --- glibc/nis/nss_nis/nis-grp.c	2016-05-30 13:25:36.203699577 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-grp.c	2016-05-31 10:37:41.783468130 +0200
> @@ -19,7 +19,7 @@
>  #include <ctype.h>
>  #include <errno.h>
>  #include <grp.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <string.h>
>  #include <libc-lock.h>
>  #include <rpcsvc/yp.h>
> @@ -32,7 +32,7 @@
>  #define ENTNAME grent
>  #define STRUCTURE group
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  /* Protect global state against multiple changers */
>  __libc_lock_define_initialized (static, lock)
> diff -pru glibc/nis/nss_nis/nis-hosts.c glibc-31052016-0900GMT/nis/nss_nis/nis-hosts.c
> --- glibc/nis/nss_nis/nis-hosts.c	2016-05-30 13:25:36.203699577 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-hosts.c	2016-05-31 10:37:59.388148305 +0200
> @@ -17,7 +17,7 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #include <assert.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <ctype.h>
>  /* The following is an ugly trick to avoid a prototype declaration for
>     _nss_nis_endgrent.  */
> @@ -53,7 +53,7 @@ struct hostent_data
>  
>  #define TRAILING_LIST_MEMBER            h_aliases
>  #define TRAILING_LIST_SEPARATOR_P       isspace
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  LINE_PARSER
>  ("#",
>   {
> diff -pru glibc/nis/nss_nis/nis-initgroups.c glibc-31052016-0900GMT/nis/nss_nis/nis-initgroups.c
> --- glibc/nis/nss_nis/nis-initgroups.c	2016-05-30 13:25:36.203699577 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-initgroups.c	2016-05-31 10:38:15.639853964 +0200
> @@ -20,7 +20,7 @@
>  #include <ctype.h>
>  #include <errno.h>
>  #include <grp.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <pwd.h>
>  #include <string.h>
>  #include <unistd.h>
> @@ -35,7 +35,7 @@
>  #define ENTNAME grent
>  #define STRUCTURE group
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  
>  static enum nss_status
> diff -pru glibc/nis/nss_nis/nis-netgrp.c glibc-31052016-0900GMT/nis/nss_nis/nis-netgrp.c
> --- glibc/nis/nss_nis/nis-netgrp.c	2016-05-30 13:25:36.203699577 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-netgrp.c	2016-05-31 10:18:55.226271404 +0200
> @@ -21,7 +21,7 @@
>  #include <errno.h>
>  #include <malloc.h>
>  #include <netdb.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> diff -pru glibc/nis/nss_nis/nis-network.c glibc-31052016-0900GMT/nis/nss_nis/nis-network.c
> --- glibc/nis/nss_nis/nis-network.c	2016-05-30 13:25:36.203699577 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-network.c	2016-05-31 10:36:14.322072328 +0200
> @@ -16,7 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <nss.h>
> +#include "../../include/nss.h"
>  /* The following is an ugly trick to avoid a prototype declaration for
>     _nss_nis_endgrent.  */
>  #define _nss_nis_endnetent _nss_nis_endnetent_XXX
> @@ -37,7 +37,7 @@
>  /* Get the declaration of the parser function.  */
>  #define ENTNAME netent
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  __libc_lock_define_initialized (static, lock)
>  
> diff -pru glibc/nis/nss_nis/nis-proto.c glibc-31052016-0900GMT/nis/nss_nis/nis-proto.c
> --- glibc/nis/nss_nis/nis-proto.c	2016-05-30 13:25:36.203699577 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-proto.c	2016-05-31 10:37:22.814813883 +0200
> @@ -16,7 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <netdb.h>
>  #include <ctype.h>
>  #include <errno.h>
> @@ -30,7 +30,7 @@
>  /* Get the declaration of the parser function.  */
>  #define ENTNAME protoent
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  __libc_lock_define_initialized (static, lock)
>  
> diff -pru glibc/nis/nss_nis/nis-publickey.c glibc-31052016-0900GMT/nis/nss_nis/nis-publickey.c
> --- glibc/nis/nss_nis/nis-publickey.c	2016-05-30 13:25:36.203699577 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-publickey.c	2016-05-31 10:16:41.730312040 +0200
> @@ -16,7 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <ctype.h>
>  #include <errno.h>
>  #include <string.h>
> diff -pru glibc/nis/nss_nis/nis-pwd.c glibc-31052016-0900GMT/nis/nss_nis/nis-pwd.c
> --- glibc/nis/nss_nis/nis-pwd.c	2016-05-30 13:25:36.203699577 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-pwd.c	2016-05-31 10:39:03.402993907 +0200
> @@ -19,7 +19,7 @@
>  #include <assert.h>
>  #include <ctype.h>
>  #include <errno.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <pwd.h>
>  #include <string.h>
>  #include <libc-lock.h>
> @@ -33,7 +33,7 @@
>  #define ENTNAME pwent
>  #define STRUCTURE passwd
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  /* Protect global state against multiple changers */
>  __libc_lock_define_initialized (static, lock)
> diff -pru glibc/nis/nss_nis/nis-rpc.c glibc-31052016-0900GMT/nis/nss_nis/nis-rpc.c
> --- glibc/nis/nss_nis/nis-rpc.c	2016-05-30 13:25:36.204699580 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-rpc.c	2016-05-31 10:38:30.397587431 +0200
> @@ -16,7 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <netdb.h>
>  #include <ctype.h>
>  #include <errno.h>
> @@ -30,7 +30,7 @@
>  /* Get the declaration of the parser function.  */
>  #define ENTNAME rpcent
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  __libc_lock_define_initialized (static, lock)
>  
> diff -pru glibc/nis/nss_nis/nis-service.c glibc-31052016-0900GMT/nis/nss_nis/nis-service.c
> --- glibc/nis/nss_nis/nis-service.c	2016-05-30 13:25:36.204699580 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-service.c	2016-05-31 10:36:35.581680033 +0200
> @@ -16,7 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <netdb.h>
>  #include <ctype.h>
>  #include <errno.h>
> @@ -32,7 +32,7 @@
>  /* Get the declaration of the parser function.  */
>  #define ENTNAME servent
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  __libc_lock_define_initialized (static, lock)
>  
> diff -pru glibc/nis/nss_nis/nis-spwd.c glibc-31052016-0900GMT/nis/nss_nis/nis-spwd.c
> --- glibc/nis/nss_nis/nis-spwd.c	2016-05-30 13:25:36.204699580 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nis/nis-spwd.c	2016-05-31 10:36:58.006267886 +0200
> @@ -16,7 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <ctype.h>
>  #include <errno.h>
>  #include <string.h>
> @@ -36,7 +36,7 @@
>  #define ENTNAME spent
>  #define STRUCTURE spwd
>  #define EXTERN_PARSER
> -#include <nss/nss_files/files-parse.c>
> +#include "../../nss/nss_files/files-parse.c"
>  
>  /* Protect global state against multiple changers */
>  __libc_lock_define_initialized (static, lock)
> diff -pru glibc/nis/nss_nisplus/nisplus-alias.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-alias.c
> --- glibc/nis/nss_nisplus/nisplus-alias.c	2016-05-30 13:25:36.204699580 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-alias.c	2016-05-31 10:13:53.792197469 +0200
> @@ -17,7 +17,7 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #include <atomic.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <errno.h>
>  #include <ctype.h>
>  #include <string.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-ethers.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-ethers.c
> --- glibc/nis/nss_nisplus/nisplus-ethers.c	2016-05-30 13:25:36.204699580 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-ethers.c	2016-05-31 10:14:50.326879224 +0200
> @@ -21,7 +21,7 @@
>  #include <errno.h>
>  #include <inttypes.h>
>  #include <netdb.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <string.h>
>  #include <netinet/ether.h>
>  #include <netinet/if_ether.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-grp.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-grp.c
> --- glibc/nis/nss_nisplus/nisplus-grp.c	2016-05-30 13:25:36.204699580 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-grp.c	2016-05-31 10:14:21.787542856 +0200
> @@ -17,7 +17,7 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #include <atomic.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <grp.h>
>  #include <ctype.h>
>  #include <errno.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-hosts.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-hosts.c
> --- glibc/nis/nss_nisplus/nisplus-hosts.c	2016-05-30 13:25:36.204699580 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-hosts.c	2016-05-31 10:13:17.985040022 +0200
> @@ -21,7 +21,7 @@
>  #include <ctype.h>
>  #include <errno.h>
>  #include <netdb.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <string.h>
>  #include <arpa/inet.h>
>  #include <netinet/in.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-initgroups.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-initgroups.c
> --- glibc/nis/nss_nisplus/nisplus-initgroups.c	2016-05-30 13:25:36.205699583 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-initgroups.c	2016-05-31 10:12:56.913538631 +0200
> @@ -16,7 +16,7 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #include <atomic.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <grp.h>
>  #include <ctype.h>
>  #include <errno.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-netgrp.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-netgrp.c
> --- glibc/nis/nss_nisplus/nisplus-netgrp.c	2016-05-30 13:25:36.205699583 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-netgrp.c	2016-05-31 10:12:31.562141270 +0200
> @@ -16,7 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <nss.h>
> +#include "../../include/nss.h" 
>  #include <errno.h>
>  #include <ctype.h>
>  #include <netdb.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-network.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-network.c
> --- glibc/nis/nss_nisplus/nisplus-network.c	2016-05-30 13:25:36.205699583 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-network.c	2016-05-31 10:15:40.374724391 +0200
> @@ -20,7 +20,7 @@
>  #include <ctype.h>
>  #include <errno.h>
>  #include <netdb.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <stdint.h>
>  #include <string.h>
>  #include <arpa/inet.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-proto.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-proto.c
> --- glibc/nis/nss_nisplus/nisplus-proto.c	2016-05-30 13:25:36.205699583 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-proto.c	2016-05-31 10:14:40.350110793 +0200
> @@ -20,7 +20,7 @@
>  #include <ctype.h>
>  #include <errno.h>
>  #include <netdb.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <string.h>
>  #include <rpcsvc/nis.h>
>  #include <libc-lock.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-publickey.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-publickey.c
> --- glibc/nis/nss_nisplus/nisplus-publickey.c	2016-05-30 13:25:36.205699583 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-publickey.c	2016-05-31 10:15:05.246533772 +0200
> @@ -16,7 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <ctype.h>
>  #include <errno.h>
>  #include <stdio.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-pwd.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-pwd.c
> --- glibc/nis/nss_nisplus/nisplus-pwd.c	2016-05-30 13:25:36.205699583 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-pwd.c	2016-05-31 10:15:30.641948083 +0200
> @@ -17,7 +17,7 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #include <atomic.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <errno.h>
>  #include <pwd.h>
>  #include <string.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-rpc.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-rpc.c
> --- glibc/nis/nss_nisplus/nisplus-rpc.c	2016-05-30 13:25:36.205699583 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-rpc.c	2016-05-31 10:13:36.594601392 +0200
> @@ -19,7 +19,7 @@
>  #include <atomic.h>
>  #include <ctype.h>
>  #include <errno.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <string.h>
>  #include <rpc/netdb.h>
>  #include <rpcsvc/nis.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-service.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-service.c
> --- glibc/nis/nss_nisplus/nisplus-service.c	2016-05-30 13:25:36.205699583 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-service.c	2016-05-31 10:15:14.884311154 +0200
> @@ -20,7 +20,7 @@
>  #include <ctype.h>
>  #include <errno.h>
>  #include <netdb.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <string.h>
>  #include <rpcsvc/nis.h>
>  #include <libc-lock.h>
> diff -pru glibc/nis/nss_nisplus/nisplus-spwd.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-spwd.c
> --- glibc/nis/nss_nisplus/nisplus-spwd.c	2016-05-30 13:25:36.205699583 +0200
> +++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-spwd.c	2016-05-31 10:15:50.194499130 +0200
> @@ -16,7 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <errno.h>
>  #include <shadow.h>
>  #include <string.h>
> diff -pru glibc/nscd/aicache.c glibc-31052016-0900GMT/nscd/aicache.c
> --- glibc/nscd/aicache.c	2016-05-30 13:25:36.259699756 +0200
> +++ glibc-31052016-0900GMT/nscd/aicache.c	2016-05-31 10:35:01.125434720 +0200
> @@ -20,7 +20,7 @@
>  #include <errno.h>
>  #include <libintl.h>
>  #include <netdb.h>
> -#include <nss.h>
> +#include "../include/nss.h"
>  #include <string.h>
>  #include <time.h>
>  #include <unistd.h>
> diff -pru glibc/nscd/getgrgid_r.c glibc-31052016-0900GMT/nscd/getgrgid_r.c
> --- glibc/nscd/getgrgid_r.c	2016-05-30 13:25:36.260699759 +0200
> +++ glibc-31052016-0900GMT/nscd/getgrgid_r.c	2016-05-31 10:34:26.094093248 +0200
> @@ -32,4 +32,4 @@
>  /* We are nscd, so we don't want to be talking to ourselves.  */
>  #undef	USE_NSCD
>  
> -#include <nss/getXXbyYY_r.c>
> +#include "../nss/getXXbyYY_r.c"
> diff -pru glibc/nscd/getgrnam_r.c glibc-31052016-0900GMT/nscd/getgrnam_r.c
> --- glibc/nscd/getgrnam_r.c	2016-05-30 13:25:36.260699759 +0200
> +++ glibc-31052016-0900GMT/nscd/getgrnam_r.c	2016-05-31 10:35:19.928083005 +0200
> @@ -31,4 +31,4 @@
>  /* We are nscd, so we don't want to be talking to ourselves.  */
>  #undef	USE_NSCD
>  
> -#include <nss/getXXbyYY_r.c>
> +#include "../nss/getXXbyYY_r.c"
> diff -pru glibc/nscd/getpwnam_r.c glibc-31052016-0900GMT/nscd/getpwnam_r.c
> --- glibc/nscd/getpwnam_r.c	2016-05-30 13:25:36.261699762 +0200
> +++ glibc-31052016-0900GMT/nscd/getpwnam_r.c	2016-05-31 10:35:39.940709986 +0200
> @@ -28,4 +28,4 @@
>  /* We are nscd, so we don't want to be talking to ourselves.  */
>  #undef	USE_NSCD
>  
> -#include <nss/getXXbyYY_r.c>
> +#include "../nss/getXXbyYY_r.c"
> diff -pru glibc/nscd/getpwuid_r.c glibc-31052016-0900GMT/nscd/getpwuid_r.c
> --- glibc/nscd/getpwuid_r.c	2016-05-30 13:25:36.261699762 +0200
> +++ glibc-31052016-0900GMT/nscd/getpwuid_r.c	2016-05-31 10:34:42.853777666 +0200
> @@ -28,4 +28,4 @@
>  /* We are nscd, so we don't want to be talking to ourselves.  */
>  #undef	USE_NSCD
>  
> -#include <nss/getXXbyYY_r.c>
> +#include "../nss/getXXbyYY_r.c"
> diff -pru glibc/nss/nss_db/db-initgroups.c glibc-31052016-0900GMT/nss/nss_db/db-initgroups.c
> --- glibc/nss/nss_db/db-initgroups.c	2016-05-30 13:25:36.268699785 +0200
> +++ glibc-31052016-0900GMT/nss/nss_db/db-initgroups.c	2016-05-31 10:11:23.968762911 +0200
> @@ -26,6 +26,7 @@
>  #include <string.h>
>  #include <stdint.h>
>  #include <sys/param.h>
> +#include "../../include/nss.h"
>  
>  #include "nss_db.h"
>  
> diff -pru glibc/nss/nss_db/db-open.c glibc-31052016-0900GMT/nss/nss_db/db-open.c
> --- glibc/nss/nss_db/db-open.c	2016-05-30 13:25:36.268699785 +0200
> +++ glibc-31052016-0900GMT/nss/nss_db/db-open.c	2016-05-31 10:11:23.969762887 +0200
> @@ -24,6 +24,7 @@
>  #include <unistd.h>
>  #include <sys/mman.h>
>  #include <not-cancel.h>
> +#include "../../include/nss.h"
>  
>  #include "nss_db.h"
>  
> diff -pru glibc/nss/nss_db/nss_db.h glibc-31052016-0900GMT/nss/nss_db/nss_db.h
> --- glibc/nss/nss_db/nss_db.h	2016-05-30 13:25:36.268699785 +0200
> +++ glibc-31052016-0900GMT/nss/nss_db/nss_db.h	2016-05-31 10:22:39.744331240 +0200
> @@ -19,7 +19,7 @@
>  #ifndef _NSS_DB_H
>  #define _NSS_DB_H	1
>  
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <stdint.h>
>  #include <libc-lock.h>
>  
> diff -pru glibc/nss/nss_files/files-initgroups.c glibc-31052016-0900GMT/nss/nss_files/files-initgroups.c
> --- glibc/nss/nss_files/files-initgroups.c	2016-05-30 13:25:36.269699788 +0200
> +++ glibc-31052016-0900GMT/nss/nss_files/files-initgroups.c	2016-05-31 10:11:23.969762887 +0200
> @@ -19,7 +19,7 @@
>  #include <alloca.h>
>  #include <errno.h>
>  #include <grp.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <stdio_ext.h>
>  #include <string.h>
>  #include <sys/param.h>
> diff -pru glibc/nss/nss_test1.c glibc-31052016-0900GMT/nss/nss_test1.c
> --- glibc/nss/nss_test1.c	2016-05-30 13:25:36.270699791 +0200
> +++ glibc-31052016-0900GMT/nss/nss_test1.c	2016-05-31 10:50:38.085223049 +0200
> @@ -1,5 +1,5 @@
>  #include <errno.h>
> -#include <nss.h>
> +#include "../include/nss.h"
>  #include <pthread.h>
>  #include <string.h>
>  
> diff -pru glibc/nss/nsswitch.h glibc-31052016-0900GMT/nss/nsswitch.h
> --- glibc/nss/nsswitch.h	2016-05-30 13:25:36.270699791 +0200
> +++ glibc-31052016-0900GMT/nss/nsswitch.h	2016-05-31 10:11:23.969762887 +0200
> @@ -22,7 +22,7 @@
>  
>  #include <arpa/nameser.h>
>  #include <netinet/in.h>
> -#include <nss.h>
> +#include "../include/nss.h"
>  #include <resolv.h>
>  #include <search.h>
>  #include <dlfcn.h>
> diff -pru glibc/nss/rewrite_field.c glibc-31052016-0900GMT/nss/rewrite_field.c
> --- glibc/nss/rewrite_field.c	2016-05-30 13:25:36.270699791 +0200
> +++ glibc-31052016-0900GMT/nss/rewrite_field.c	2016-05-31 10:11:23.969762887 +0200
> @@ -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
> diff -pru glibc/nss/tst-field.c glibc-31052016-0900GMT/nss/tst-field.c
> --- glibc/nss/tst-field.c	2016-05-30 13:25:36.271699794 +0200
> +++ glibc-31052016-0900GMT/nss/tst-field.c	2016-05-31 11:19:33.707722652 +0200
> @@ -19,7 +19,7 @@
>  /* This test needs to be statically linked because it access hidden
>     functions.  */
>  
> -#include <nss.h>
> +#include "../include/nss.h"
>  #include <stdbool.h>
>  #include <stdio.h>
>  #include <stdlib.h>
> diff -pru glibc/nss/tst-nss-test1.c glibc-31052016-0900GMT/nss/tst-nss-test1.c
> --- glibc/nss/tst-nss-test1.c	2016-05-30 13:25:36.271699794 +0200
> +++ glibc-31052016-0900GMT/nss/tst-nss-test1.c	2016-05-31 10:50:38.086223026 +0200
> @@ -1,4 +1,4 @@
> -#include <nss.h>
> +#include "../include/nss.h"
>  #include <pwd.h>
>  #include <stdio.h>
>  #include <stdlib.h>
> diff -pru glibc/nss/valid_field.c glibc-31052016-0900GMT/nss/valid_field.c
> --- glibc/nss/valid_field.c	2016-05-30 13:25:36.271699794 +0200
> +++ glibc-31052016-0900GMT/nss/valid_field.c	2016-05-31 10:11:23.969762887 +0200
> @@ -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;
> diff -pru glibc/nss/valid_list_field.c glibc-31052016-0900GMT/nss/valid_list_field.c
> --- glibc/nss/valid_list_field.c	2016-05-30 13:25:36.271699794 +0200
> +++ glibc-31052016-0900GMT/nss/valid_list_field.c	2016-05-31 10:11:23.970762863 +0200
> @@ -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>
>  
> diff -pru glibc/pwd/fgetpwent_r.c glibc-31052016-0900GMT/pwd/fgetpwent_r.c
> --- glibc/pwd/fgetpwent_r.c	2016-05-30 13:25:36.341700018 +0200
> +++ glibc-31052016-0900GMT/pwd/fgetpwent_r.c	2016-05-31 10:32:51.189898768 +0200
> @@ -30,7 +30,7 @@
>  #define ENTNAME		pwent
>  struct pwent_data {};
>  
> -#include <nss/nss_files/files-parse.c>
> +#include "../nss/nss_files/files-parse.c"
>  LINE_PARSER
>  (,
>   STRING_FIELD (result->pw_name, ISCOLON, 0);
> diff -pru glibc/pwd/getpwnam_r.c glibc-31052016-0900GMT/pwd/getpwnam_r.c
> --- glibc/pwd/getpwnam_r.c	2016-05-30 13:25:36.341700018 +0200
> +++ glibc-31052016-0900GMT/pwd/getpwnam_r.c	2016-05-31 10:34:09.339409709 +0200
> @@ -26,4 +26,4 @@
>  #define ADD_VARIABLES	name
>  #define BUFLEN		NSS_BUFLEN_PASSWD
>  
> -#include <nss/getXXbyYY_r.c>
> +#include "../nss/getXXbyYY_r.c"
> diff -pru glibc/pwd/getpwuid_r.c glibc-31052016-0900GMT/pwd/getpwuid_r.c
> --- glibc/pwd/getpwuid_r.c	2016-05-30 13:25:36.341700018 +0200
> +++ glibc-31052016-0900GMT/pwd/getpwuid_r.c	2016-05-31 10:33:27.492204394 +0200
> @@ -26,4 +26,4 @@
>  #define ADD_VARIABLES	uid
>  #define BUFLEN		NSS_BUFLEN_PASSWD
>  
> -#include <nss/getXXbyYY_r.c>
> +#include "../nss/getXXbyYY_r.c"
> diff -pru glibc/pwd/putpwent.c glibc-31052016-0900GMT/pwd/putpwent.c
> --- glibc/pwd/putpwent.c	2016-05-30 13:25:36.341700018 +0200
> +++ glibc-31052016-0900GMT/pwd/putpwent.c	2016-05-31 11:33:28.008442188 +0200
> @@ -18,7 +18,7 @@
>  #include <errno.h>
>  #include <stdio.h>
>  #include <pwd.h>
> -#include <nss.h>
> +#include "../include/nss.h"
>  
>  #define _S(x)	x ?: ""
>  
> diff -pru glibc/shadow/fgetspent_r.c glibc-31052016-0900GMT/shadow/fgetspent_r.c
> --- glibc/shadow/fgetspent_r.c	2016-05-30 13:25:36.363700088 +0200
> +++ glibc-31052016-0900GMT/shadow/fgetspent_r.c	2016-05-31 10:29:23.784956880 +0200
> @@ -31,7 +31,7 @@
>  #define	EXTERN_PARSER	1
>  struct spent_data {};
>  
> -#include <nss/nss_files/files-parse.c>
> +#include "../nss/nss_files/files-parse.c"
>  
>  
>  /* Read one shadow entry from the given stream.  */
> diff -pru glibc/shadow/putspent.c glibc-31052016-0900GMT/shadow/putspent.c
> --- glibc/shadow/putspent.c	2016-05-30 13:25:36.364700091 +0200
> +++ glibc-31052016-0900GMT/shadow/putspent.c	2016-05-31 11:33:11.095740174 +0200
> @@ -16,7 +16,7 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #include <errno.h>
> -#include <nss.h>
> +#include "../include/nss.h"
>  #include <stdio.h>
>  #include <shadow.h>
>  
> diff -pru glibc/shadow/sgetspent_r.c glibc-31052016-0900GMT/shadow/sgetspent_r.c
> --- glibc/shadow/sgetspent_r.c	2016-05-30 13:25:36.364700091 +0200
> +++ glibc-31052016-0900GMT/shadow/sgetspent_r.c	2016-05-31 10:29:07.602280163 +0200
> @@ -32,7 +32,7 @@ struct spent_data {};
>  #define FALSEP(arg) 0
>  
>  
> -#include <nss/nss_files/files-parse.c>
> +#include "../nss/nss_files/files-parse.c"
>  LINE_PARSER
>  (,
>   STRING_FIELD (result->sp_namp, ISCOLON, 0);
> diff -pru glibc/sysdeps/posix/getaddrinfo.c glibc-31052016-0900GMT/sysdeps/posix/getaddrinfo.c
> --- glibc/sysdeps/posix/getaddrinfo.c	2016-05-30 13:25:36.799701482 +0200
> +++ glibc-31052016-0900GMT/sysdeps/posix/getaddrinfo.c	2016-05-31 10:27:06.968721269 +0200
> @@ -58,7 +58,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
>  #include <errno.h>
>  #include <ifaddrs.h>
>  #include <netdb.h>
> -#include <nss.h>
> +#include "../../include/nss.h"
>  #include <resolv.h>
>  #include <stdbool.h>
>  #include <stdio.h>
>
  
Guido Trentalancia May 31, 2016, 3:33 p.m. UTC | #2
Hello Adhemerval,

thanks for getting back about this patch and the other issues with the
header inclusion system.

Il giorno mar, 31/05/2016 alle 12.09 -0300, Adhemerval Zanella ha
scritto:
> 
> On 31/05/2016 10:20, Guido Trentalancia wrote:
> > A build failure might occur 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).
> > 
> > For example, a build configuration that leads to the occurrence of
> > this
> > bug includes passing the Mozilla NSS library headers full path to
> > the
> > preprocessor using CPPFLAGS.
> > 
> > This patch aims to fix such build failure (BZ 17956) by helping the
> > preprocessor pick the right (local) "nss.h" header file during
> > compilation.
> > 
> > This new version includes amendments to both source and test files
> > (in a
> > unique patch instead of two separate patches).
> 
> This is missing a proper ChangeLog [1]

I can write one if needed. However, the patch is trivial (it mostly
just sources nss.h differently using a relative path, a not much more).

> Besides that I am not following this patch.  The only function
> defined in
> nss/nss.h is __nss_configure_lookup along with some other internal
> defines
> (NSS_STATUS_*).  The ABI from libnss3 nss.h file is completely
> different
> I am not seeing how we can just replace its inclusion.

Wherever you see <nss/nss.h> or "nss.h" or similar within GNU libc it
is meant nss.h from GNU libc and not from libnss3.

However under some circumstances it might happen that the latter is
sourced instead of the GNU libc, causing a build failure.

> My understanding is trying to building using configured provided
> CPPFLAGS
> defies the proper configure check plus makefile rules that uses
> system
> provides nss-config and nspr-config commands to get the very include
> and library directories (and as you pointed out in a earlier message
> it seems also broken [2]).

[2] is another patch that is highly recommended, although it won't
completely solve BZ 17956, it might only prevent it from happening.

To make the inclusion of nss.h from GNU libc robust this patch is
necessary even when [2] has been applied.

> So I think the proper way to re-enable external nss build is first
> correct
> the configure checks and instead of passing the external flags
> through
> CPPFLAGS, to make sure the intended nss-config/nspr-config are on
> PATH
> for both configure check and makefile rule generation to get the
> correct
> flags.

As already explained, it is highly recommended that [2] is applied
([PATCH v2] When using the Mozilla NSS library for cryptography,
include the NSPR header files).

Then this patch should be applied to make the build system completely
robust, even against modified CPPFLAGS.

Finally, a third patch should be applied to prevent false positives
(FAIL) in one test: [PATCH v2] Ignore nspr headers directory when
checking local headers

I recommend to apply all the three patches as soon as possible so that
the build and test systems are sane and robust when using the Mozilla
NSS library for cryptography !

Please let me know if the ChangeLog is required for the first two
patches and I will be glad to prepare one (what has been changed is
trivial and explained in the header of each patch).

Best regards,

Guido Trentalancia

> [1]
> https://sourceware.org/glibc/wiki/Contribution%20checklist#Properly_F
> ormatted_GNU_ChangeLog
> [2] https://sourceware.org/ml/libc-alpha/2016-05/msg00746.html
  
Carlos O'Donell May 31, 2016, 3:50 p.m. UTC | #3
On 05/31/2016 11:33 AM, Guido Trentalancia wrote:
> Please let me know if the ChangeLog is required for the first two
> patches and I will be glad to prepare one (what has been changed is
> trivial and explained in the header of each patch).

Adhemerval or myself can write the ChangeLog for you as a first time
contributor.

The real issue is that I don't think your patch are quite correct
or we haven't found the real cause of the failure.

On Fedora we use --enable-nss-crypt for all of our builds and see
no problems.

You add nss3/nspr include directories to CFLAGS, which should not
be needed.

Your configure fails if you don't, and *that* is the key problem
we should be looking at.

The NSS headers are derived from calling, as they should:
nss-config --includedir
And that is used everywhere it is needed.

So the fault appears to be in your nss-config?

What does your failing config.log show?

What does `nss-config --includedir` print on your system?
  
Guido Trentalancia May 31, 2016, 5 p.m. UTC | #4
Hello Carlos.

On Tue, 31/05/2016 at 11.50 -0400, Carlos O'Donell wrote:
> On 05/31/2016 11:33 AM, Guido Trentalancia wrote:
> > Please let me know if the ChangeLog is required for the first two
> > patches and I will be glad to prepare one (what has been changed is
> > trivial and explained in the header of each patch).
> 
> Adhemerval or myself can write the ChangeLog for you as a first time
> contributor.
> 
> The real issue is that I don't think your patch are quite correct
> or we haven't found the real cause of the failure.
> 
> On Fedora we use --enable-nss-crypt for all of our builds and see
> no problems.
> 
> You add nss3/nspr include directories to CFLAGS, which should not
> be needed.

It is needed because the configure test program uses hasht.h
(and nsslowhash.h) from the Mozilla NSS library which has the following
include:

#include "prtypes.h"

That is why, unless Mozilla NSPR changes the above to:

#include <nspr/prtypes.h>

the configure test program from GNU libc fails to compile.

I bet in Fedora you have patched with sed the Mozilla NSS header files
so that they include <nspr/prtypes.h> instead of "prtypes.h"...?

> Your configure fails if you don't, and *that* is the key problem
> we should be looking at.
> 
> The NSS headers are derived from calling, as they should:
> nss-config --includedir
> And that is used everywhere it is needed.
> 
> So the fault appears to be in your nss-config?

Nope.

> What does your failing config.log show?

It shows that the configure test program does not compile because it
cannot source the required Mozilla NSPR header file.

> What does `nss-config --includedir` print on your system?

It prints the correct location of Mozilla NSS header files (but
not those of Mozilla NSPR header files which are sources without the
correct path).

It might be a bug with the Mozilla NSS header files, however applying
the patches to GNU libc won't hurt I suppose. When using the latest
versions of the three patches, I get no new test failures and in
particular, no test failures within the nss or crypt components.

So, what should we do ? If you are willing to accept the changes as a safety precaution even though it might be a bug in the Mozilla NSS header files, then I can write the ChangeLog, otherwise it doesn't matter.

Best regards,

Guido Trentalancia
  
Adhemerval Zanella Netto May 31, 2016, 7:05 p.m. UTC | #5
On 31/05/2016 14:00, Guido Trentalancia wrote:
> Hello Carlos.
> 
> On Tue, 31/05/2016 at 11.50 -0400, Carlos O'Donell wrote:
>> On 05/31/2016 11:33 AM, Guido Trentalancia wrote:
>>> Please let me know if the ChangeLog is required for the first two
>>> patches and I will be glad to prepare one (what has been changed is
>>> trivial and explained in the header of each patch).
>>
>> Adhemerval or myself can write the ChangeLog for you as a first time
>> contributor.
>>
>> The real issue is that I don't think your patch are quite correct
>> or we haven't found the real cause of the failure.
>>
>> On Fedora we use --enable-nss-crypt for all of our builds and see
>> no problems.
>>
>> You add nss3/nspr include directories to CFLAGS, which should not
>> be needed.
> 
> It is needed because the configure test program uses hasht.h
> (and nsslowhash.h) from the Mozilla NSS library which has the following
> include:
> 
> #include "prtypes.h"
> 
> That is why, unless Mozilla NSPR changes the above to:
> 
> #include <nspr/prtypes.h>
> 
> the configure test program from GNU libc fails to compile.
> 
> I bet in Fedora you have patched with sed the Mozilla NSS header files
> so that they include <nspr/prtypes.h> instead of "prtypes.h"...?

Nops, the distro I am using does not have this change, all the headers
uses plain '#include "prtypes.h"'. The only deviation is libfreebl3.so is
not installed in the expected folder.

However I does not prevent to correctly configure it if I instruct the
linekr flags to check on correct folder for nss plugins.

I think this patch is wrong because even when nss.h is presented on the
system, GLIBC include sysdep directive will use GLIBC own nss.h header.
Building using with --enable-nss-crypt with the patch to fix the npsr
include and add the linker command to find libfreebl3.so in my system,
the md5-crypt.c shows:

---
typedef int PRBool;
# 1 "/usr/include/nss/hasht.h" 1





#define _HASHT_H_ 

# 1 "/usr/include/nspr/prtypes.h" 1
# 21 "/usr/include/nspr/prtypes.h"
#define prtypes_h___ 




# 1 "/usr/include/nspr/prcpucfg.h" 1
# 12 "/usr/include/nspr/prcpucfg.h"
#define nspr_cpucfg___ 
---

And my hasht.h has:

  5 #ifndef _HASHT_H_
  6 #define _HASHT_H_
  7 
  8 #include "prtypes.h"

So I do not think this is the correct fix.

> 
>> Your configure fails if you don't, and *that* is the key problem
>> we should be looking at.
>>
>> The NSS headers are derived from calling, as they should:
>> nss-config --includedir
>> And that is used everywhere it is needed.
>>
>> So the fault appears to be in your nss-config?
> 
> Nope.
> 
>> What does your failing config.log show?
> 
> It shows that the configure test program does not compile because it
> cannot source the required Mozilla NSPR header file.
> 
>> What does `nss-config --includedir` print on your system?
> 
> It prints the correct location of Mozilla NSS header files (but
> not those of Mozilla NSPR header files which are sources without the
> correct path).
> 
> It might be a bug with the Mozilla NSS header files, however applying
> the patches to GNU libc won't hurt I suppose. When using the latest
> versions of the three patches, I get no new test failures and in
> particular, no test failures within the nss or crypt components.
> 
> So, what should we do ? If you are willing to accept the changes as a safety precaution even though it might be a bug in the Mozilla NSS header files, then I can write the ChangeLog, otherwise it doesn't matter.
> 
> Best regards,
> 
> Guido Trentalancia
>
  
Guido Trentalancia May 31, 2016, 7:24 p.m. UTC | #6
Hello again.

On Tue, 31/05/2016 at 16.05 -0300, Adhemerval Zanella wrote:
> 
> On 31/05/2016 14:00, Guido Trentalancia wrote:
> > Hello Carlos.
> > 
> > On Tue, 31/05/2016 at 11.50 -0400, Carlos O'Donell wrote:
> > > On 05/31/2016 11:33 AM, Guido Trentalancia wrote:
> > > > Please let me know if the ChangeLog is required for the first
> > > > two
> > > > patches and I will be glad to prepare one (what has been
> > > > changed is
> > > > trivial and explained in the header of each patch).
> > > 
> > > Adhemerval or myself can write the ChangeLog for you as a first
> > > time
> > > contributor.
> > > 
> > > The real issue is that I don't think your patch are quite correct
> > > or we haven't found the real cause of the failure.
> > > 
> > > On Fedora we use --enable-nss-crypt for all of our builds and see
> > > no problems.
> > > 
> > > You add nss3/nspr include directories to CFLAGS, which should not
> > > be needed.
> > 
> > It is needed because the configure test program uses hasht.h
> > (and nsslowhash.h) from the Mozilla NSS library which has the
> > following
> > include:
> > 
> > #include "prtypes.h"
> > 
> > That is why, unless Mozilla NSPR changes the above to:
> > 
> > #include <nspr/prtypes.h>
> > 
> > the configure test program from GNU libc fails to compile.
> > 
> > I bet in Fedora you have patched with sed the Mozilla NSS header
> > files
> > so that they include <nspr/prtypes.h> instead of "prtypes.h"...?
> 
> Nops, the distro I am using does not have this change, all the
> headers
> uses plain '#include "prtypes.h"'. 

So, you either need the patch posted with the following message
subject:

[PATCH v3] When using the Mozilla NSS library for cryptography, include
the NSPR header files

or otherwise, you need the patch posted with this message subject in
conjunction with:

CPPFLAGS="-I/path_to_your_NSS_header_files -I/path_to_your_NSPR_header_files"

The two above mentioned patches are compatible with each other, so you
can also use both (without the need for setting CPPFLAGS).

> The only deviation is libfreebl3.so is
> not installed in the expected folder.
> 
> However I does not prevent to correctly configure it if I instruct
> the
> linekr flags to check on correct folder for nss plugins.
> 
> I think this patch is wrong because even when nss.h is presented on
> the
> system, GLIBC include sysdep directive will use GLIBC own nss.h
> header.

I have tested the latest versions of all patches submitted and they are
correct because they fix the problem and prevent it from happening.

> Building using with --enable-nss-crypt with the patch to fix the npsr
> include and add the linker command to find libfreebl3.so in my
> system,
> the md5-crypt.c shows:
> 
> ---
> typedef int PRBool;
> # 1 "/usr/include/nss/hasht.h" 1
> 
> 
> 
> 
> 
> #define _HASHT_H_ 
> 
> # 1 "/usr/include/nspr/prtypes.h" 1
> # 21 "/usr/include/nspr/prtypes.h"
> #define prtypes_h___ 
> 
> 
> 
> 
> # 1 "/usr/include/nspr/prcpucfg.h" 1
> # 12 "/usr/include/nspr/prcpucfg.h"
> #define nspr_cpucfg___ 
> ---
> 
> And my hasht.h has:
> 
>   5 #ifndef _HASHT_H_
>   6 #define _HASHT_H_
>   7 
>   8 #include "prtypes.h"
> 
> So I do not think this is the correct fix.

What makes you think that it is not the correct fix ? You have first to
overcome the problems with the file locations, as introduced by your
distribution, not being compliant with FHS, then everything will work.

As already explained, the three patches fixes slightly different things
and they have been designed to work together:

[1] https://sourceware.org/bugzilla/attachment.cgi?id=9302 (fixes
possible conflicts between Mozilla NSS nss.h header file and GNU libc
nss.h header file)

[2] https://sourceware.org/ml/libc-alpha/2016-05/msg00738.html (fixes
the GNU libc build system to correctly detect and use Mozilla NSPR)

[3] https://sourceware.org/ml/libc-alpha/2016-05/msg00729.html (fixes
the GNU libc test system to prevent false positives related to the use
of the Mozilla NSPR header files)

[...]

> > It might be a bug with the Mozilla NSS header files, however
> > applying
> > the patches to GNU libc won't hurt I suppose. When using the latest
> > versions of the three patches, I get no new test failures and in
> > particular, no test failures within the nss or crypt components.

[...]

Best regards,

Guido Trentalancia
  

Patch

diff -pru glibc/grp/fgetgrent_r.c glibc-31052016-0900GMT/grp/fgetgrent_r.c
--- glibc/grp/fgetgrent_r.c	2016-05-30 13:25:35.403697020 +0200
+++ glibc-31052016-0900GMT/grp/fgetgrent_r.c	2016-05-31 10:26:09.912895303 +0200
@@ -33,7 +33,7 @@  struct grent_data {};
 
 #define TRAILING_LIST_MEMBER		gr_mem
 #define TRAILING_LIST_SEPARATOR_P(c)	((c) == ',')
-#include <nss/nss_files/files-parse.c>
+#include "../nss/nss_files/files-parse.c"
 LINE_PARSER
 (,
  STRING_FIELD (result->gr_name, ISCOLON, 0);
diff -pru glibc/grp/getgrgid_r.c glibc-31052016-0900GMT/grp/getgrgid_r.c
--- glibc/grp/getgrgid_r.c	2016-05-30 13:25:35.403697020 +0200
+++ glibc-31052016-0900GMT/grp/getgrgid_r.c	2016-05-31 10:25:34.494630502 +0200
@@ -29,4 +29,4 @@ 
 #define DEEPCOPY_FN	__copy_grp
 #define MERGE_FN	__merge_grp
 
-#include <nss/getXXbyYY_r.c>
+#include "../nss/getXXbyYY_r.c"
diff -pru glibc/grp/getgrnam_r.c glibc-31052016-0900GMT/grp/getgrnam_r.c
--- glibc/grp/getgrnam_r.c	2016-05-30 13:25:35.404697023 +0200
+++ glibc-31052016-0900GMT/grp/getgrnam_r.c	2016-05-31 10:25:52.658252852 +0200
@@ -29,4 +29,4 @@ 
 #define DEEPCOPY_FN	__copy_grp
 #define MERGE_FN	__merge_grp
 
-#include <nss/getXXbyYY_r.c>
+#include "../nss/getXXbyYY_r.c"
diff -pru glibc/grp/putgrent.c glibc-31052016-0900GMT/grp/putgrent.c
--- glibc/grp/putgrent.c	2016-05-30 13:25:35.404697023 +0200
+++ glibc-31052016-0900GMT/grp/putgrent.c	2016-05-31 11:32:52.669065354 +0200
@@ -16,7 +16,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
-#include <nss.h>
+#include "../include/nss.h"
 #include <stdio.h>
 #include <string.h>
 #include <grp.h>
diff -pru glibc/gshadow/fgetsgent_r.c glibc-31052016-0900GMT/gshadow/fgetsgent_r.c
--- glibc/gshadow/fgetsgent_r.c	2016-05-30 13:25:35.405697027 +0200
+++ glibc-31052016-0900GMT/gshadow/fgetsgent_r.c	2016-05-31 10:24:58.422384367 +0200
@@ -28,7 +28,7 @@ 
 #define	EXTERN_PARSER	1
 struct sgent_data {};
 
-#include <nss/nss_files/files-parse.c>
+#include "../nss/nss_files/files-parse.c"
 
 
 /* Read one shadow entry from the given stream.  */
diff -pru glibc/gshadow/putsgent.c glibc-31052016-0900GMT/gshadow/putsgent.c
--- glibc/gshadow/putsgent.c	2016-05-30 13:25:35.406697030 +0200
+++ glibc-31052016-0900GMT/gshadow/putsgent.c	2016-05-31 11:32:04.859911596 +0200
@@ -19,7 +19,7 @@ 
 #include <stdbool.h>
 #include <stdio.h>
 #include <gshadow.h>
-#include <nss.h>
+#include "../include/nss.h"
 
 #define _S(x)	x ? x : ""
 
diff -pru glibc/gshadow/sgetsgent_r.c glibc-31052016-0900GMT/gshadow/sgetsgent_r.c
--- glibc/gshadow/sgetsgent_r.c	2016-05-30 13:25:35.406697030 +0200
+++ glibc-31052016-0900GMT/gshadow/sgetsgent_r.c	2016-05-31 10:24:11.361375682 +0200
@@ -31,7 +31,7 @@  struct sgent_data {};
 
 #define TRAILING_LIST_MEMBER		sg_mem
 #define TRAILING_LIST_SEPARATOR_P(c)	((c) == ',')
-#include <nss/nss_files/files-parse.c>
+#include "../nss/nss_files/files-parse.c"
 LINE_PARSER
 (,
  STRING_FIELD (result->sg_namp, ISCOLON, 0);
diff -pru glibc/hesiod/nss_hesiod/hesiod-grp.c glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-grp.c
--- glibc/hesiod/nss_hesiod/hesiod-grp.c	2016-05-30 13:25:35.407697033 +0200
+++ glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-grp.c	2016-05-31 10:30:48.335283621 +0200
@@ -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>
@@ -30,7 +30,7 @@ 
 #define ENTNAME grent
 #define STRUCTURE group
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 enum nss_status
 _nss_hesiod_setgrent (int stayopen)
diff -pru glibc/hesiod/nss_hesiod/hesiod-proto.c glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-proto.c
--- glibc/hesiod/nss_hesiod/hesiod-proto.c	2016-05-30 13:25:35.407697033 +0200
+++ glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-proto.c	2016-05-31 10:30:30.381636721 +0200
@@ -20,7 +20,7 @@ 
 #include <hesiod.h>
 #include <netdb.h>
 #include <netinet/in.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -35,7 +35,7 @@  struct protoent_data {};
 
 #define TRAILING_LIST_MEMBER		p_aliases
 #define TRAILING_LIST_SEPARATOR_P	isspace
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 LINE_PARSER
 ("#",
  STRING_FIELD (result->p_name, isspace, 1);
diff -pru glibc/hesiod/nss_hesiod/hesiod-pwd.c glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-pwd.c
--- glibc/hesiod/nss_hesiod/hesiod-pwd.c	2016-05-30 13:25:35.407697033 +0200
+++ glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-pwd.c	2016-05-31 10:29:58.128274035 +0200
@@ -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>
@@ -28,7 +28,7 @@ 
 #define ENTNAME pwent
 #define STRUCTURE passwd
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 enum nss_status
 _nss_hesiod_setpwent (int stayopen)
diff -pru glibc/hesiod/nss_hesiod/hesiod-service.c glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-service.c
--- glibc/hesiod/nss_hesiod/hesiod-service.c	2016-05-30 13:25:35.407697033 +0200
+++ glibc-31052016-0900GMT/hesiod/nss_hesiod/hesiod-service.c	2016-05-31 10:31:14.667767864 +0200
@@ -20,7 +20,7 @@ 
 #include <hesiod.h>
 #include <netdb.h>
 #include <netinet/in.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -34,7 +34,7 @@  struct servent_data {};
 
 #define TRAILING_LIST_MEMBER		s_aliases
 #define TRAILING_LIST_SEPARATOR_P	isspace
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 #define ISSC_OR_SPACE(c)	((c) ==  ';' || isspace (c))
 LINE_PARSER
 ("#",
diff -pru glibc/include/nss.h glibc-31052016-0900GMT/include/nss.h
--- glibc/include/nss.h	2016-05-30 13:25:35.699697966 +0200
+++ glibc-31052016-0900GMT/include/nss.h	2016-05-31 10:11:23.970762863 +0200
@@ -1,5 +1,5 @@ 
 #ifndef _NSS_H
-#include <nss/nss.h>
+#include "../nss/nss.h"
 
 #define NSS_INVALID_FIELD_CHARACTERS ":\n"
 extern const char __nss_invalid_field_characters[] attribute_hidden;
diff -pru glibc/include/nsswitch.h glibc-31052016-0900GMT/include/nsswitch.h
--- glibc/include/nsswitch.h	2016-05-30 13:25:35.699697966 +0200
+++ glibc-31052016-0900GMT/include/nsswitch.h	2016-05-31 10:11:23.968762911 +0200
@@ -1 +1 @@ 
-#include <nss/nsswitch.h>
+#include "../nss/nsswitch.h"
diff -pru glibc/include/pwd.h glibc-31052016-0900GMT/include/pwd.h
--- glibc/include/pwd.h	2016-05-30 13:25:35.700697969 +0200
+++ glibc-31052016-0900GMT/include/pwd.h	2016-05-31 10:32:21.816464031 +0200
@@ -24,7 +24,7 @@  extern int __fgetpwent_r (FILE * __strea
 			  char *__buffer, size_t __buflen,
 			  struct passwd **__result);
 
-#include <nss.h>
+#include "../include/nss.h"
 
 struct parser_data;
 extern int _nss_files_parse_pwent (char *line, struct passwd *result,
diff -pru glibc/inet/ether_ntoh.c glibc-31052016-0900GMT/inet/ether_ntoh.c
--- glibc/inet/ether_ntoh.c	2016-05-30 13:25:35.709697998 +0200
+++ glibc-31052016-0900GMT/inet/ether_ntoh.c	2016-05-31 10:28:07.175496023 +0200
@@ -21,7 +21,7 @@ 
 #include <netinet/if_ether.h>
 #include <string.h>
 
-#include <nss/nsswitch.h>
+#include "../nss/nsswitch.h"
 
 
 /* Type of the lookup function we need here.  */
diff -pru glibc/inet/gethstbynm.c glibc-31052016-0900GMT/inet/gethstbynm.c
--- glibc/inet/gethstbynm.c	2016-05-30 13:25:35.709697998 +0200
+++ glibc-31052016-0900GMT/inet/gethstbynm.c	2016-05-31 10:27:40.359040040 +0200
@@ -34,4 +34,4 @@ 
 
 #define HANDLE_DIGITS_DOTS	1
 
-#include <nss/getXXbyYY.c>
+#include "../nss/getXXbyYY.c"
diff -pru glibc/nis/nss_compat/compat-grp.c glibc-31052016-0900GMT/nis/nss_compat/compat-grp.c
--- glibc/nis/nss_compat/compat-grp.c	2016-05-30 13:25:36.201699571 +0200
+++ glibc-31052016-0900GMT/nis/nss_compat/compat-grp.c	2016-05-31 10:39:49.413172409 +0200
@@ -20,7 +20,7 @@ 
 #include <errno.h>
 #include <fcntl.h>
 #include <grp.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <nsswitch.h>
 #include <stdio_ext.h>
 #include <string.h>
@@ -44,7 +44,7 @@  static enum nss_status (*nss_endgrent) (
 #define ENTNAME grent
 #define STRUCTURE group
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 /* Structure for remembering -group members ... */
 #define BLACKLIST_INITIAL_SIZE 512
diff -pru glibc/nis/nss_compat/compat-initgroups.c glibc-31052016-0900GMT/nis/nss_compat/compat-initgroups.c
--- glibc/nis/nss_compat/compat-initgroups.c	2016-05-30 13:25:36.202699574 +0200
+++ glibc-31052016-0900GMT/nis/nss_compat/compat-initgroups.c	2016-05-31 10:39:31.480491781 +0200
@@ -20,7 +20,7 @@ 
 #include <errno.h>
 #include <fcntl.h>
 #include <grp.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <stdio_ext.h>
 #include <string.h>
 #include <unistd.h>
@@ -55,7 +55,7 @@  __libc_lock_define_initialized (static,
 #define ENTNAME grent
 #define STRUCTURE group
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 /* Structure for remembering -group members ... */
 #define BLACKLIST_INITIAL_SIZE 512
diff -pru glibc/nis/nss_compat/compat-pwd.c glibc-31052016-0900GMT/nis/nss_compat/compat-pwd.c
--- glibc/nis/nss_compat/compat-pwd.c	2016-05-30 13:25:36.202699574 +0200
+++ glibc-31052016-0900GMT/nis/nss_compat/compat-pwd.c	2016-05-31 10:40:20.933613540 +0200
@@ -20,7 +20,7 @@ 
 #include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <nsswitch.h>
 #include <pwd.h>
 #include <stdio_ext.h>
@@ -48,7 +48,7 @@  static enum nss_status (*nss_endpwent) (
 #define ENTNAME pwent
 #define STRUCTURE passwd
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 /* Structure for remembering -@netgroup and -user members ... */
 #define BLACKLIST_INITIAL_SIZE 512
diff -pru glibc/nis/nss_compat/compat-spwd.c glibc-31052016-0900GMT/nis/nss_compat/compat-spwd.c
--- glibc/nis/nss_compat/compat-spwd.c	2016-05-30 13:25:36.202699574 +0200
+++ glibc-31052016-0900GMT/nis/nss_compat/compat-spwd.c	2016-05-31 10:40:04.766899786 +0200
@@ -20,7 +20,7 @@ 
 #include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <nsswitch.h>
 #include <shadow.h>
 #include <stdio_ext.h>
@@ -45,7 +45,7 @@  static enum nss_status (*nss_endspent) (
 #define ENTNAME spent
 #define STRUCTURE spwd
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 /* Structure for remembering -@netgroup and -user members ... */
 #define BLACKLIST_INITIAL_SIZE 512
diff -pru glibc/nis/nss_nis/nis-alias.c glibc-31052016-0900GMT/nis/nss_nis/nis-alias.c
--- glibc/nis/nss_nis/nis-alias.c	2016-05-30 13:25:36.202699574 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-alias.c	2016-05-31 10:17:03.363813921 +0200
@@ -16,7 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <nss.h>
+#include "../../include/nss.h"
 #include <ctype.h>
 #include <errno.h>
 #include <string.h>
diff -pru glibc/nis/nss_nis/nis-ethers.c glibc-31052016-0900GMT/nis/nss_nis/nis-ethers.c
--- glibc/nis/nss_nis/nis-ethers.c	2016-05-30 13:25:36.202699574 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-ethers.c	2016-05-31 10:38:45.111322402 +0200
@@ -16,7 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <nss.h>
+#include "../../include/nss.h"
 #include <ctype.h>
 #include <errno.h>
 #include <string.h>
@@ -35,7 +35,7 @@  __libc_lock_define_initialized (static,
 #define ENTNAME etherent
 #define STRUCTURE etherent
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 struct response
 {
diff -pru glibc/nis/nss_nis/nis-grp.c glibc-31052016-0900GMT/nis/nss_nis/nis-grp.c
--- glibc/nis/nss_nis/nis-grp.c	2016-05-30 13:25:36.203699577 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-grp.c	2016-05-31 10:37:41.783468130 +0200
@@ -19,7 +19,7 @@ 
 #include <ctype.h>
 #include <errno.h>
 #include <grp.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <string.h>
 #include <libc-lock.h>
 #include <rpcsvc/yp.h>
@@ -32,7 +32,7 @@ 
 #define ENTNAME grent
 #define STRUCTURE group
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 /* Protect global state against multiple changers */
 __libc_lock_define_initialized (static, lock)
diff -pru glibc/nis/nss_nis/nis-hosts.c glibc-31052016-0900GMT/nis/nss_nis/nis-hosts.c
--- glibc/nis/nss_nis/nis-hosts.c	2016-05-30 13:25:36.203699577 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-hosts.c	2016-05-31 10:37:59.388148305 +0200
@@ -17,7 +17,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <assert.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <ctype.h>
 /* The following is an ugly trick to avoid a prototype declaration for
    _nss_nis_endgrent.  */
@@ -53,7 +53,7 @@  struct hostent_data
 
 #define TRAILING_LIST_MEMBER            h_aliases
 #define TRAILING_LIST_SEPARATOR_P       isspace
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 LINE_PARSER
 ("#",
  {
diff -pru glibc/nis/nss_nis/nis-initgroups.c glibc-31052016-0900GMT/nis/nss_nis/nis-initgroups.c
--- glibc/nis/nss_nis/nis-initgroups.c	2016-05-30 13:25:36.203699577 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-initgroups.c	2016-05-31 10:38:15.639853964 +0200
@@ -20,7 +20,7 @@ 
 #include <ctype.h>
 #include <errno.h>
 #include <grp.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <pwd.h>
 #include <string.h>
 #include <unistd.h>
@@ -35,7 +35,7 @@ 
 #define ENTNAME grent
 #define STRUCTURE group
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 
 static enum nss_status
diff -pru glibc/nis/nss_nis/nis-netgrp.c glibc-31052016-0900GMT/nis/nss_nis/nis-netgrp.c
--- glibc/nis/nss_nis/nis-netgrp.c	2016-05-30 13:25:36.203699577 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-netgrp.c	2016-05-31 10:18:55.226271404 +0200
@@ -21,7 +21,7 @@ 
 #include <errno.h>
 #include <malloc.h>
 #include <netdb.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff -pru glibc/nis/nss_nis/nis-network.c glibc-31052016-0900GMT/nis/nss_nis/nis-network.c
--- glibc/nis/nss_nis/nis-network.c	2016-05-30 13:25:36.203699577 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-network.c	2016-05-31 10:36:14.322072328 +0200
@@ -16,7 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <nss.h>
+#include "../../include/nss.h"
 /* The following is an ugly trick to avoid a prototype declaration for
    _nss_nis_endgrent.  */
 #define _nss_nis_endnetent _nss_nis_endnetent_XXX
@@ -37,7 +37,7 @@ 
 /* Get the declaration of the parser function.  */
 #define ENTNAME netent
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 __libc_lock_define_initialized (static, lock)
 
diff -pru glibc/nis/nss_nis/nis-proto.c glibc-31052016-0900GMT/nis/nss_nis/nis-proto.c
--- glibc/nis/nss_nis/nis-proto.c	2016-05-30 13:25:36.203699577 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-proto.c	2016-05-31 10:37:22.814813883 +0200
@@ -16,7 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <nss.h>
+#include "../../include/nss.h"
 #include <netdb.h>
 #include <ctype.h>
 #include <errno.h>
@@ -30,7 +30,7 @@ 
 /* Get the declaration of the parser function.  */
 #define ENTNAME protoent
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 __libc_lock_define_initialized (static, lock)
 
diff -pru glibc/nis/nss_nis/nis-publickey.c glibc-31052016-0900GMT/nis/nss_nis/nis-publickey.c
--- glibc/nis/nss_nis/nis-publickey.c	2016-05-30 13:25:36.203699577 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-publickey.c	2016-05-31 10:16:41.730312040 +0200
@@ -16,7 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <nss.h>
+#include "../../include/nss.h"
 #include <ctype.h>
 #include <errno.h>
 #include <string.h>
diff -pru glibc/nis/nss_nis/nis-pwd.c glibc-31052016-0900GMT/nis/nss_nis/nis-pwd.c
--- glibc/nis/nss_nis/nis-pwd.c	2016-05-30 13:25:36.203699577 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-pwd.c	2016-05-31 10:39:03.402993907 +0200
@@ -19,7 +19,7 @@ 
 #include <assert.h>
 #include <ctype.h>
 #include <errno.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <pwd.h>
 #include <string.h>
 #include <libc-lock.h>
@@ -33,7 +33,7 @@ 
 #define ENTNAME pwent
 #define STRUCTURE passwd
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 /* Protect global state against multiple changers */
 __libc_lock_define_initialized (static, lock)
diff -pru glibc/nis/nss_nis/nis-rpc.c glibc-31052016-0900GMT/nis/nss_nis/nis-rpc.c
--- glibc/nis/nss_nis/nis-rpc.c	2016-05-30 13:25:36.204699580 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-rpc.c	2016-05-31 10:38:30.397587431 +0200
@@ -16,7 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <nss.h>
+#include "../../include/nss.h"
 #include <netdb.h>
 #include <ctype.h>
 #include <errno.h>
@@ -30,7 +30,7 @@ 
 /* Get the declaration of the parser function.  */
 #define ENTNAME rpcent
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 __libc_lock_define_initialized (static, lock)
 
diff -pru glibc/nis/nss_nis/nis-service.c glibc-31052016-0900GMT/nis/nss_nis/nis-service.c
--- glibc/nis/nss_nis/nis-service.c	2016-05-30 13:25:36.204699580 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-service.c	2016-05-31 10:36:35.581680033 +0200
@@ -16,7 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <nss.h>
+#include "../../include/nss.h"
 #include <netdb.h>
 #include <ctype.h>
 #include <errno.h>
@@ -32,7 +32,7 @@ 
 /* Get the declaration of the parser function.  */
 #define ENTNAME servent
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 __libc_lock_define_initialized (static, lock)
 
diff -pru glibc/nis/nss_nis/nis-spwd.c glibc-31052016-0900GMT/nis/nss_nis/nis-spwd.c
--- glibc/nis/nss_nis/nis-spwd.c	2016-05-30 13:25:36.204699580 +0200
+++ glibc-31052016-0900GMT/nis/nss_nis/nis-spwd.c	2016-05-31 10:36:58.006267886 +0200
@@ -16,7 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <nss.h>
+#include "../../include/nss.h"
 #include <ctype.h>
 #include <errno.h>
 #include <string.h>
@@ -36,7 +36,7 @@ 
 #define ENTNAME spent
 #define STRUCTURE spwd
 #define EXTERN_PARSER
-#include <nss/nss_files/files-parse.c>
+#include "../../nss/nss_files/files-parse.c"
 
 /* Protect global state against multiple changers */
 __libc_lock_define_initialized (static, lock)
diff -pru glibc/nis/nss_nisplus/nisplus-alias.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-alias.c
--- glibc/nis/nss_nisplus/nisplus-alias.c	2016-05-30 13:25:36.204699580 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-alias.c	2016-05-31 10:13:53.792197469 +0200
@@ -17,7 +17,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <atomic.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
diff -pru glibc/nis/nss_nisplus/nisplus-ethers.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-ethers.c
--- glibc/nis/nss_nisplus/nisplus-ethers.c	2016-05-30 13:25:36.204699580 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-ethers.c	2016-05-31 10:14:50.326879224 +0200
@@ -21,7 +21,7 @@ 
 #include <errno.h>
 #include <inttypes.h>
 #include <netdb.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <string.h>
 #include <netinet/ether.h>
 #include <netinet/if_ether.h>
diff -pru glibc/nis/nss_nisplus/nisplus-grp.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-grp.c
--- glibc/nis/nss_nisplus/nisplus-grp.c	2016-05-30 13:25:36.204699580 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-grp.c	2016-05-31 10:14:21.787542856 +0200
@@ -17,7 +17,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <atomic.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <grp.h>
 #include <ctype.h>
 #include <errno.h>
diff -pru glibc/nis/nss_nisplus/nisplus-hosts.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-hosts.c
--- glibc/nis/nss_nisplus/nisplus-hosts.c	2016-05-30 13:25:36.204699580 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-hosts.c	2016-05-31 10:13:17.985040022 +0200
@@ -21,7 +21,7 @@ 
 #include <ctype.h>
 #include <errno.h>
 #include <netdb.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <string.h>
 #include <arpa/inet.h>
 #include <netinet/in.h>
diff -pru glibc/nis/nss_nisplus/nisplus-initgroups.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-initgroups.c
--- glibc/nis/nss_nisplus/nisplus-initgroups.c	2016-05-30 13:25:36.205699583 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-initgroups.c	2016-05-31 10:12:56.913538631 +0200
@@ -16,7 +16,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <atomic.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <grp.h>
 #include <ctype.h>
 #include <errno.h>
diff -pru glibc/nis/nss_nisplus/nisplus-netgrp.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-netgrp.c
--- glibc/nis/nss_nisplus/nisplus-netgrp.c	2016-05-30 13:25:36.205699583 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-netgrp.c	2016-05-31 10:12:31.562141270 +0200
@@ -16,7 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <nss.h>
+#include "../../include/nss.h" 
 #include <errno.h>
 #include <ctype.h>
 #include <netdb.h>
diff -pru glibc/nis/nss_nisplus/nisplus-network.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-network.c
--- glibc/nis/nss_nisplus/nisplus-network.c	2016-05-30 13:25:36.205699583 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-network.c	2016-05-31 10:15:40.374724391 +0200
@@ -20,7 +20,7 @@ 
 #include <ctype.h>
 #include <errno.h>
 #include <netdb.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <stdint.h>
 #include <string.h>
 #include <arpa/inet.h>
diff -pru glibc/nis/nss_nisplus/nisplus-proto.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-proto.c
--- glibc/nis/nss_nisplus/nisplus-proto.c	2016-05-30 13:25:36.205699583 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-proto.c	2016-05-31 10:14:40.350110793 +0200
@@ -20,7 +20,7 @@ 
 #include <ctype.h>
 #include <errno.h>
 #include <netdb.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <string.h>
 #include <rpcsvc/nis.h>
 #include <libc-lock.h>
diff -pru glibc/nis/nss_nisplus/nisplus-publickey.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-publickey.c
--- glibc/nis/nss_nisplus/nisplus-publickey.c	2016-05-30 13:25:36.205699583 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-publickey.c	2016-05-31 10:15:05.246533772 +0200
@@ -16,7 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <nss.h>
+#include "../../include/nss.h"
 #include <ctype.h>
 #include <errno.h>
 #include <stdio.h>
diff -pru glibc/nis/nss_nisplus/nisplus-pwd.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-pwd.c
--- glibc/nis/nss_nisplus/nisplus-pwd.c	2016-05-30 13:25:36.205699583 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-pwd.c	2016-05-31 10:15:30.641948083 +0200
@@ -17,7 +17,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <atomic.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <errno.h>
 #include <pwd.h>
 #include <string.h>
diff -pru glibc/nis/nss_nisplus/nisplus-rpc.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-rpc.c
--- glibc/nis/nss_nisplus/nisplus-rpc.c	2016-05-30 13:25:36.205699583 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-rpc.c	2016-05-31 10:13:36.594601392 +0200
@@ -19,7 +19,7 @@ 
 #include <atomic.h>
 #include <ctype.h>
 #include <errno.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <string.h>
 #include <rpc/netdb.h>
 #include <rpcsvc/nis.h>
diff -pru glibc/nis/nss_nisplus/nisplus-service.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-service.c
--- glibc/nis/nss_nisplus/nisplus-service.c	2016-05-30 13:25:36.205699583 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-service.c	2016-05-31 10:15:14.884311154 +0200
@@ -20,7 +20,7 @@ 
 #include <ctype.h>
 #include <errno.h>
 #include <netdb.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <string.h>
 #include <rpcsvc/nis.h>
 #include <libc-lock.h>
diff -pru glibc/nis/nss_nisplus/nisplus-spwd.c glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-spwd.c
--- glibc/nis/nss_nisplus/nisplus-spwd.c	2016-05-30 13:25:36.205699583 +0200
+++ glibc-31052016-0900GMT/nis/nss_nisplus/nisplus-spwd.c	2016-05-31 10:15:50.194499130 +0200
@@ -16,7 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <nss.h>
+#include "../../include/nss.h"
 #include <errno.h>
 #include <shadow.h>
 #include <string.h>
diff -pru glibc/nscd/aicache.c glibc-31052016-0900GMT/nscd/aicache.c
--- glibc/nscd/aicache.c	2016-05-30 13:25:36.259699756 +0200
+++ glibc-31052016-0900GMT/nscd/aicache.c	2016-05-31 10:35:01.125434720 +0200
@@ -20,7 +20,7 @@ 
 #include <errno.h>
 #include <libintl.h>
 #include <netdb.h>
-#include <nss.h>
+#include "../include/nss.h"
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
diff -pru glibc/nscd/getgrgid_r.c glibc-31052016-0900GMT/nscd/getgrgid_r.c
--- glibc/nscd/getgrgid_r.c	2016-05-30 13:25:36.260699759 +0200
+++ glibc-31052016-0900GMT/nscd/getgrgid_r.c	2016-05-31 10:34:26.094093248 +0200
@@ -32,4 +32,4 @@ 
 /* We are nscd, so we don't want to be talking to ourselves.  */
 #undef	USE_NSCD
 
-#include <nss/getXXbyYY_r.c>
+#include "../nss/getXXbyYY_r.c"
diff -pru glibc/nscd/getgrnam_r.c glibc-31052016-0900GMT/nscd/getgrnam_r.c
--- glibc/nscd/getgrnam_r.c	2016-05-30 13:25:36.260699759 +0200
+++ glibc-31052016-0900GMT/nscd/getgrnam_r.c	2016-05-31 10:35:19.928083005 +0200
@@ -31,4 +31,4 @@ 
 /* We are nscd, so we don't want to be talking to ourselves.  */
 #undef	USE_NSCD
 
-#include <nss/getXXbyYY_r.c>
+#include "../nss/getXXbyYY_r.c"
diff -pru glibc/nscd/getpwnam_r.c glibc-31052016-0900GMT/nscd/getpwnam_r.c
--- glibc/nscd/getpwnam_r.c	2016-05-30 13:25:36.261699762 +0200
+++ glibc-31052016-0900GMT/nscd/getpwnam_r.c	2016-05-31 10:35:39.940709986 +0200
@@ -28,4 +28,4 @@ 
 /* We are nscd, so we don't want to be talking to ourselves.  */
 #undef	USE_NSCD
 
-#include <nss/getXXbyYY_r.c>
+#include "../nss/getXXbyYY_r.c"
diff -pru glibc/nscd/getpwuid_r.c glibc-31052016-0900GMT/nscd/getpwuid_r.c
--- glibc/nscd/getpwuid_r.c	2016-05-30 13:25:36.261699762 +0200
+++ glibc-31052016-0900GMT/nscd/getpwuid_r.c	2016-05-31 10:34:42.853777666 +0200
@@ -28,4 +28,4 @@ 
 /* We are nscd, so we don't want to be talking to ourselves.  */
 #undef	USE_NSCD
 
-#include <nss/getXXbyYY_r.c>
+#include "../nss/getXXbyYY_r.c"
diff -pru glibc/nss/nss_db/db-initgroups.c glibc-31052016-0900GMT/nss/nss_db/db-initgroups.c
--- glibc/nss/nss_db/db-initgroups.c	2016-05-30 13:25:36.268699785 +0200
+++ glibc-31052016-0900GMT/nss/nss_db/db-initgroups.c	2016-05-31 10:11:23.968762911 +0200
@@ -26,6 +26,7 @@ 
 #include <string.h>
 #include <stdint.h>
 #include <sys/param.h>
+#include "../../include/nss.h"
 
 #include "nss_db.h"
 
diff -pru glibc/nss/nss_db/db-open.c glibc-31052016-0900GMT/nss/nss_db/db-open.c
--- glibc/nss/nss_db/db-open.c	2016-05-30 13:25:36.268699785 +0200
+++ glibc-31052016-0900GMT/nss/nss_db/db-open.c	2016-05-31 10:11:23.969762887 +0200
@@ -24,6 +24,7 @@ 
 #include <unistd.h>
 #include <sys/mman.h>
 #include <not-cancel.h>
+#include "../../include/nss.h"
 
 #include "nss_db.h"
 
diff -pru glibc/nss/nss_db/nss_db.h glibc-31052016-0900GMT/nss/nss_db/nss_db.h
--- glibc/nss/nss_db/nss_db.h	2016-05-30 13:25:36.268699785 +0200
+++ glibc-31052016-0900GMT/nss/nss_db/nss_db.h	2016-05-31 10:22:39.744331240 +0200
@@ -19,7 +19,7 @@ 
 #ifndef _NSS_DB_H
 #define _NSS_DB_H	1
 
-#include <nss.h>
+#include "../../include/nss.h"
 #include <stdint.h>
 #include <libc-lock.h>
 
diff -pru glibc/nss/nss_files/files-initgroups.c glibc-31052016-0900GMT/nss/nss_files/files-initgroups.c
--- glibc/nss/nss_files/files-initgroups.c	2016-05-30 13:25:36.269699788 +0200
+++ glibc-31052016-0900GMT/nss/nss_files/files-initgroups.c	2016-05-31 10:11:23.969762887 +0200
@@ -19,7 +19,7 @@ 
 #include <alloca.h>
 #include <errno.h>
 #include <grp.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <stdio_ext.h>
 #include <string.h>
 #include <sys/param.h>
diff -pru glibc/nss/nss_test1.c glibc-31052016-0900GMT/nss/nss_test1.c
--- glibc/nss/nss_test1.c	2016-05-30 13:25:36.270699791 +0200
+++ glibc-31052016-0900GMT/nss/nss_test1.c	2016-05-31 10:50:38.085223049 +0200
@@ -1,5 +1,5 @@ 
 #include <errno.h>
-#include <nss.h>
+#include "../include/nss.h"
 #include <pthread.h>
 #include <string.h>
 
diff -pru glibc/nss/nsswitch.h glibc-31052016-0900GMT/nss/nsswitch.h
--- glibc/nss/nsswitch.h	2016-05-30 13:25:36.270699791 +0200
+++ glibc-31052016-0900GMT/nss/nsswitch.h	2016-05-31 10:11:23.969762887 +0200
@@ -22,7 +22,7 @@ 
 
 #include <arpa/nameser.h>
 #include <netinet/in.h>
-#include <nss.h>
+#include "../include/nss.h"
 #include <resolv.h>
 #include <search.h>
 #include <dlfcn.h>
diff -pru glibc/nss/rewrite_field.c glibc-31052016-0900GMT/nss/rewrite_field.c
--- glibc/nss/rewrite_field.c	2016-05-30 13:25:36.270699791 +0200
+++ glibc-31052016-0900GMT/nss/rewrite_field.c	2016-05-31 10:11:23.969762887 +0200
@@ -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
diff -pru glibc/nss/tst-field.c glibc-31052016-0900GMT/nss/tst-field.c
--- glibc/nss/tst-field.c	2016-05-30 13:25:36.271699794 +0200
+++ glibc-31052016-0900GMT/nss/tst-field.c	2016-05-31 11:19:33.707722652 +0200
@@ -19,7 +19,7 @@ 
 /* This test needs to be statically linked because it access hidden
    functions.  */
 
-#include <nss.h>
+#include "../include/nss.h"
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
diff -pru glibc/nss/tst-nss-test1.c glibc-31052016-0900GMT/nss/tst-nss-test1.c
--- glibc/nss/tst-nss-test1.c	2016-05-30 13:25:36.271699794 +0200
+++ glibc-31052016-0900GMT/nss/tst-nss-test1.c	2016-05-31 10:50:38.086223026 +0200
@@ -1,4 +1,4 @@ 
-#include <nss.h>
+#include "../include/nss.h"
 #include <pwd.h>
 #include <stdio.h>
 #include <stdlib.h>
diff -pru glibc/nss/valid_field.c glibc-31052016-0900GMT/nss/valid_field.c
--- glibc/nss/valid_field.c	2016-05-30 13:25:36.271699794 +0200
+++ glibc-31052016-0900GMT/nss/valid_field.c	2016-05-31 10:11:23.969762887 +0200
@@ -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;
diff -pru glibc/nss/valid_list_field.c glibc-31052016-0900GMT/nss/valid_list_field.c
--- glibc/nss/valid_list_field.c	2016-05-30 13:25:36.271699794 +0200
+++ glibc-31052016-0900GMT/nss/valid_list_field.c	2016-05-31 10:11:23.970762863 +0200
@@ -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>
 
diff -pru glibc/pwd/fgetpwent_r.c glibc-31052016-0900GMT/pwd/fgetpwent_r.c
--- glibc/pwd/fgetpwent_r.c	2016-05-30 13:25:36.341700018 +0200
+++ glibc-31052016-0900GMT/pwd/fgetpwent_r.c	2016-05-31 10:32:51.189898768 +0200
@@ -30,7 +30,7 @@ 
 #define ENTNAME		pwent
 struct pwent_data {};
 
-#include <nss/nss_files/files-parse.c>
+#include "../nss/nss_files/files-parse.c"
 LINE_PARSER
 (,
  STRING_FIELD (result->pw_name, ISCOLON, 0);
diff -pru glibc/pwd/getpwnam_r.c glibc-31052016-0900GMT/pwd/getpwnam_r.c
--- glibc/pwd/getpwnam_r.c	2016-05-30 13:25:36.341700018 +0200
+++ glibc-31052016-0900GMT/pwd/getpwnam_r.c	2016-05-31 10:34:09.339409709 +0200
@@ -26,4 +26,4 @@ 
 #define ADD_VARIABLES	name
 #define BUFLEN		NSS_BUFLEN_PASSWD
 
-#include <nss/getXXbyYY_r.c>
+#include "../nss/getXXbyYY_r.c"
diff -pru glibc/pwd/getpwuid_r.c glibc-31052016-0900GMT/pwd/getpwuid_r.c
--- glibc/pwd/getpwuid_r.c	2016-05-30 13:25:36.341700018 +0200
+++ glibc-31052016-0900GMT/pwd/getpwuid_r.c	2016-05-31 10:33:27.492204394 +0200
@@ -26,4 +26,4 @@ 
 #define ADD_VARIABLES	uid
 #define BUFLEN		NSS_BUFLEN_PASSWD
 
-#include <nss/getXXbyYY_r.c>
+#include "../nss/getXXbyYY_r.c"
diff -pru glibc/pwd/putpwent.c glibc-31052016-0900GMT/pwd/putpwent.c
--- glibc/pwd/putpwent.c	2016-05-30 13:25:36.341700018 +0200
+++ glibc-31052016-0900GMT/pwd/putpwent.c	2016-05-31 11:33:28.008442188 +0200
@@ -18,7 +18,7 @@ 
 #include <errno.h>
 #include <stdio.h>
 #include <pwd.h>
-#include <nss.h>
+#include "../include/nss.h"
 
 #define _S(x)	x ?: ""
 
diff -pru glibc/shadow/fgetspent_r.c glibc-31052016-0900GMT/shadow/fgetspent_r.c
--- glibc/shadow/fgetspent_r.c	2016-05-30 13:25:36.363700088 +0200
+++ glibc-31052016-0900GMT/shadow/fgetspent_r.c	2016-05-31 10:29:23.784956880 +0200
@@ -31,7 +31,7 @@ 
 #define	EXTERN_PARSER	1
 struct spent_data {};
 
-#include <nss/nss_files/files-parse.c>
+#include "../nss/nss_files/files-parse.c"
 
 
 /* Read one shadow entry from the given stream.  */
diff -pru glibc/shadow/putspent.c glibc-31052016-0900GMT/shadow/putspent.c
--- glibc/shadow/putspent.c	2016-05-30 13:25:36.364700091 +0200
+++ glibc-31052016-0900GMT/shadow/putspent.c	2016-05-31 11:33:11.095740174 +0200
@@ -16,7 +16,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
-#include <nss.h>
+#include "../include/nss.h"
 #include <stdio.h>
 #include <shadow.h>
 
diff -pru glibc/shadow/sgetspent_r.c glibc-31052016-0900GMT/shadow/sgetspent_r.c
--- glibc/shadow/sgetspent_r.c	2016-05-30 13:25:36.364700091 +0200
+++ glibc-31052016-0900GMT/shadow/sgetspent_r.c	2016-05-31 10:29:07.602280163 +0200
@@ -32,7 +32,7 @@  struct spent_data {};
 #define FALSEP(arg) 0
 
 
-#include <nss/nss_files/files-parse.c>
+#include "../nss/nss_files/files-parse.c"
 LINE_PARSER
 (,
  STRING_FIELD (result->sp_namp, ISCOLON, 0);
diff -pru glibc/sysdeps/posix/getaddrinfo.c glibc-31052016-0900GMT/sysdeps/posix/getaddrinfo.c
--- glibc/sysdeps/posix/getaddrinfo.c	2016-05-30 13:25:36.799701482 +0200
+++ glibc-31052016-0900GMT/sysdeps/posix/getaddrinfo.c	2016-05-31 10:27:06.968721269 +0200
@@ -58,7 +58,7 @@  SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 #include <errno.h>
 #include <ifaddrs.h>
 #include <netdb.h>
-#include <nss.h>
+#include "../../include/nss.h"
 #include <resolv.h>
 #include <stdbool.h>
 #include <stdio.h>