From 6777eb62b8ee2b569454dc9b1d27e51a7dbf8764 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 27 Jul 2023 13:57:51 +0200 Subject: [PATCH] pwcache: Do not declare uidtb and gidtb when not used When the system provides implementations for user_from_uid() or group_from_gid() we are not using these variables, so better not declare them. Fixes: commit 21d12b02112097f0c195dceb1892c95b7b957b36 --- src/pwcache.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pwcache.c b/src/pwcache.c index 99609d9..8ed855c 100644 --- a/src/pwcache.c +++ b/src/pwcache.c @@ -83,8 +83,12 @@ typedef struct gidc { * cache both hits and misses. */ +#ifndef HAVE_USER_FROM_UID static UIDC **uidtb; /* uid to name cache */ +#endif +#ifndef HAVE_GROUP_FROM_GID static GIDC **gidtb; /* gid to name cache */ +#endif static UIDC **usrtb; /* user name to uid cache */ static GIDC **grptb; /* group name to gid cache */ -- 2.47.3