fix breakage found by mass one-applet builds

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 9425c7b..ee8b4ec 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -329,21 +329,6 @@
 
 static bool suid_cfg_readable;
 
-/* check if u is member of group g */
-static int ingroup(uid_t u, gid_t g)
-{
-	struct group *grp = getgrgid(g);
-	if (grp) {
-		char **mem;
-		for (mem = grp->gr_mem; *mem; mem++) {
-			struct passwd *pwd = getpwnam(*mem);
-			if (pwd && (pwd->pw_uid == u))
-				return 1;
-		}
-	}
-	return 0;
-}
-
 /* libbb candidate */
 static char *get_trimmed_slice(char *s, char *e)
 {
@@ -568,7 +553,22 @@
 # endif /* FEATURE_SUID_CONFIG */
 
 
-# if ENABLE_FEATURE_SUID
+# if ENABLE_FEATURE_SUID && NUM_APPLETS > 0
+/* check if u is member of group g */
+static int ingroup(uid_t u, gid_t g)
+{
+	struct group *grp = getgrgid(g);
+	if (grp) {
+		char **mem;
+		for (mem = grp->gr_mem; *mem; mem++) {
+			struct passwd *pwd = getpwnam(*mem);
+			if (pwd && (pwd->pw_uid == u))
+				return 1;
+		}
+	}
+	return 0;
+}
+
 static void check_suid(int applet_no)
 {
 	gid_t rgid;  /* real gid */