From 6f19927b98de091d83e668b60680be98909834e7 Mon Sep 17 00:00:00 2001 From: Stefan Liebler Date: Thu, 10 Dec 2020 11:31:57 +0100 Subject: Fix linknamespace errors in nss_database.c if build with -Os. Starting with recent commits, I get 43 conform/.../linknamespace FAILs: - nss: Introduce - : New abstraction for combining NSS modules and NSS actions - nss: Implement (see nss/nss_database.c) - nsswitch: use new internal API (core) - nsswitch: user new internal API (tests) - nsswitch: use new internal API (callers) e.g. conform/XPG42/wordexp.h/linknamespace.out [initial] wordexp -> [libc.a(wordexp.o)] __getpwnam_r -> [libc.a(getpwnam_r.o)] __nss_database_custom -> [libc.a(nsswitch.o)] __nss_database_get -> [libc.a(nss_database.o)] feof_unlocked [initial] wordexp -> [libc.a(wordexp.o)] __getpwnam_r -> [libc.a(getpwnam_r.o)] __nss_database_custom -> [libc.a(nsswitch.o)] __nss_database_get -> [libc.a(nss_database.o)] ferror_unlocked This patch is just using __ferror_unlocked and __feof_unlocked instead of the non "__" prefixed ones. Reviewed-by: DJ Delorie --- nss/nss_database.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nss/nss_database.c b/nss/nss_database.c index e8c307d1f3..6ff537152f 100644 --- a/nss/nss_database.c +++ b/nss/nss_database.c @@ -271,9 +271,9 @@ nss_database_reload_1 (struct nss_database_data *data, FILE *fp) while (true) { ssize_t ret = __getline (&line, &line_allocated, fp); - if (ferror_unlocked (fp)) + if (__ferror_unlocked (fp)) break; - if (feof_unlocked (fp)) + if (__feof_unlocked (fp)) { result = true; break; -- cgit 1.4.1