projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add and consolidate nasty stdio_ext junk
[oweals/musl.git]
/
src
/
passwd
/
getspnam.c
1
#include "pwf.h"
2
3
#define LINE_LIM 256
4
5
struct spwd *getspnam(const char *name)
6
{
7
static struct spwd sp;
8
static char *line;
9
struct spwd *res;
10
int e;
11
12
if (!line) line = malloc(LINE_LIM);
13
if (!line) return 0;
14
e = getspnam_r(name, &sp, line, LINE_LIM, &res);
15
if (e) errno = e;
16
return res;
17
}