diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-02-17 13:21:56 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-02-17 13:21:56 -0500 |
commit | cac872957e8c9e3fc13904c1c55eee0253ec1382 (patch) | |
tree | f3b6fb0402b32ea47469412f0f1baa2b4239a63b /src/passwd/fgetgrent.c | |
parent | b9e08308f4d1fccc188408b223e6820194a5fadf (diff) | |
download | musl-cac872957e8c9e3fc13904c1c55eee0253ec1382.tar.gz musl-cac872957e8c9e3fc13904c1c55eee0253ec1382.tar.bz2 musl-cac872957e8c9e3fc13904c1c55eee0253ec1382.tar.xz musl-cac872957e8c9e3fc13904c1c55eee0253ec1382.zip |
add fgetgrent function
based on patch by Isaac Dunham, moved to its own file to avoid
increasing bss on static linked programs not using this nonstandard
function but using the standard getgrent function, and vice versa.
Diffstat (limited to 'src/passwd/fgetgrent.c')
-rw-r--r-- | src/passwd/fgetgrent.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/passwd/fgetgrent.c b/src/passwd/fgetgrent.c new file mode 100644 index 00000000..2f18d925 --- /dev/null +++ b/src/passwd/fgetgrent.c @@ -0,0 +1,9 @@ +#include "pwf.h" + +struct group *fgetgrent(FILE *f) +{ + static char *line, **mem; + static struct group gr; + size_t size=0, nmem=0; + return __getgrent_a(f, &gr, &line, &size, &mem, &nmem); +} |