--- a/source4/torture/local/nss_tests.c Tue Jul 21 05:47:50 2015 +++ b/source4/torture/local/nss_tests.c Tue Sep 15 12:06:59 2015 @@ -690,6 +690,7 @@ return true; } +#ifdef HAVE_GETGROUPLIST static bool test_getgrouplist(struct torture_context *tctx, const char *user, gid_t gid, @@ -724,6 +725,7 @@ return true; } +#endif /* HAVE_GETGROUPLIST */ static bool test_user_in_group(struct torture_context *tctx, const struct passwd *pwd, @@ -751,12 +753,14 @@ int g, i; bool primary_group_had_user_member = false; +#ifdef HAVE_GETGROUPLIST torture_assert(tctx, test_getgrouplist(tctx, pwd->pw_name, pwd->pw_gid, &user_groups, &num_user_groups), "failed to test getgrouplist"); +#endif /* HAVE_GETGROUPLIST */ for (g=0; g < num_user_groups; g++) { torture_assert(tctx, test_getgrgid(tctx, user_groups[g], NULL),