summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/group-list.c6
-rw-r--r--src/id.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/group-list.c b/src/group-list.c
index 4c5391ddb..1fadd0c57 100644
--- a/src/group-list.c
+++ b/src/group-list.c
@@ -54,14 +54,13 @@ print_group_list (const char *username,
ok = false;
}
-#if HAVE_GETGROUPS
{
- GETGROUPS_T *groups;
+ gid_t *groups;
int i;
int n_groups = mgetgroups (username, (pwd ? pwd->pw_gid : (gid_t) -1),
&groups);
- if (n_groups < 0)
+ if (n_groups < 0 && errno != ENOSYS)
{
if (username)
{
@@ -84,7 +83,6 @@ print_group_list (const char *username,
}
free (groups);
}
-#endif /* HAVE_GETGROUPS */
return ok;
}
diff --git a/src/id.c b/src/id.c
index 601e77077..9a00f5ce4 100644
--- a/src/id.c
+++ b/src/id.c
@@ -292,14 +292,13 @@ print_full_info (const char *username)
printf ("(%s)", grp->gr_name);
}
-#if HAVE_GETGROUPS
{
- GETGROUPS_T *groups;
+ gid_t *groups;
int i;
int n_groups = mgetgroups (username, (pwd ? pwd->pw_gid : (gid_t) -1),
&groups);
- if (n_groups < 0)
+ if (n_groups < 0 && errno != ENOSYS)
{
if (username)
{
@@ -327,7 +326,6 @@ print_full_info (const char *username)
}
free (groups);
}
-#endif /* HAVE_GETGROUPS */
/* POSIX mandates the precise output format, and that it not include
any context=... part, so skip that if POSIXLY_CORRECT is set. */