basic/user-util: properly protect use of gshadow

Commit 100d5f6ee6 (user-util: add new wrappers for [...] database
files), ammended by commit 4f07ffa8f5 (Use #if instead of #ifdef for
ENABLE_GSHADOW) moved code from sysuser to basic/user-util.

In doing so, the combination of both commits properly propagated the
ENABLE_GSHADOW conditions around the function manipulating gshadow, but
they forgot to protect the inclusion of the gshadow.h header.

Fix that to be able to build on C libraries that do not provide gshadow
(e.g. uClibc-ng, where it does not exist.)
This commit is contained in:
Yann E. MORIN 2018-11-21 18:09:04 +01:00 committed by Lennart Poettering
parent 9d52a6e5a9
commit 66a5b5ce9b
1 changed files with 2 additions and 0 deletions

View File

@ -2,7 +2,9 @@
#pragma once
#include <grp.h>
#if ENABLE_GSHADOW
#include <gshadow.h>
#endif
#include <pwd.h>
#include <shadow.h>
#include <stdbool.h>