From 7eba555cc6ab982c87916091c850ea7f4b1247e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Stelmach?= Date: Thu, 21 Jul 2022 23:02:23 +0200 Subject: [PATCH] tizen: Use getline() when building nss_optfiles MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit After moving to libc (6212bb67f4 "nss_files: Move into libc") started using __getline() (0e1f068108 "Fix linknamespace errors and local-plt-usages in nss_files.") which is not available when building nss_optfiles as a module. Change-Id: I1e7443bcb64b6c63c8d47b53afdc3e8916702416 Fixes: 0b9125e2a3 ("tizen: Add optfiles nss module") Signed-off-by: Łukasz Stelmach --- nss/nss_files/files-initgroups.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nss/nss_files/files-initgroups.c b/nss/nss_files/files-initgroups.c index f1715e1..0557f00 100644 --- a/nss/nss_files/files-initgroups.c +++ b/nss/nss_files/files-initgroups.c @@ -68,7 +68,11 @@ CONCAT3(_nss_, NSSNAME, _initgroups_dyn) (const char *user, gid_t group, long in { fpos_t pos; fgetpos (stream, &pos); +#ifndef DATAFILE_PREFIX_PATH /* nss_files */ ssize_t n = __getline (&line, &linelen, stream); +#else /* nss_optfiles */ + ssize_t n = getline (&line, &linelen, stream); +#endif if (n < 0) { if (! __feof_unlocked (stream)) -- 2.7.4