diff options
| author | Simon J. Gerraty <sjg@FreeBSD.org> | 2012-11-04 02:52:03 +0000 |
|---|---|---|
| committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2012-11-04 02:52:03 +0000 |
| commit | 08870ffbc9e2cee84244c234ad5b56ea9aa26fc1 (patch) | |
| tree | 6529410589884f91f893352ebc9478b9dbfbaf81 /pw/pw_group.c | |
| parent | e31403ceb5782471289eff04659a003fc5832d0b (diff) | |
| parent | 530ff00378e7fc235e5ea51067c77398d575141e (diff) | |
| download | pw-darwin-08870ffbc9e2cee84244c234ad5b56ea9aa26fc1.tar.gz pw-darwin-08870ffbc9e2cee84244c234ad5b56ea9aa26fc1.zip | |
Sync from head
Diffstat (limited to 'pw/pw_group.c')
| -rw-r--r-- | pw/pw_group.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pw/pw_group.c b/pw/pw_group.c index a8f182c..f4f2116 100644 --- a/pw/pw_group.c +++ b/pw/pw_group.c @@ -34,6 +34,8 @@ static const char rcsid[] = #include <termios.h> #include <stdbool.h> #include <unistd.h> +#include <grp.h> +#include <libutil.h> #include "pw.h" #include "bitmap.h" @@ -403,10 +405,9 @@ static int print_group(struct group * grp, int pretty) { if (!pretty) { - int buflen = 0; char *buf = NULL; - fmtgrent(&buf, &buflen, grp); + buf = gr_make(grp); fputs(buf, stdout); free(buf); } else { |
