]>
git.ipfire.org Git - thirdparty/shadow.git/commit
lib/: Include <gshadow.h> if it's available
The existing code was assuming that libc's <shadow.h> includes
<gshadow.h>. That's not true.
alx@debian:~$ find /usr/include/shadow.h
/usr/include/shadow.h
alx@debian:~$ find /usr/include/gshadow.h
/usr/include/gshadow.h
alx@debian:~$ grep include.*gshadow /usr/include/shadow.h
alx@debian:~$
As a result, we were unconditionally including our own "gshadow_.h".
Fix that incorrect assumption, and do the following instead:
- Include unconditionally our own "gshadow_.h".
- Make our "gshadow_.h" include <gshadow.h> if it exists,
and only provide the declarations otherwise.
While at it, fix the include guard to be consistent with the project.
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>