| Index: fusl/src/unistd/getlogin_r.c
|
| diff --git a/fusl/src/unistd/getlogin_r.c b/fusl/src/unistd/getlogin_r.c
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..53866c6dce4077d8a53ba118a6460c2f2e6f55ee
|
| --- /dev/null
|
| +++ b/fusl/src/unistd/getlogin_r.c
|
| @@ -0,0 +1,12 @@
|
| +#include <unistd.h>
|
| +#include <string.h>
|
| +#include <errno.h>
|
| +
|
| +int getlogin_r(char *name, size_t size)
|
| +{
|
| + char *logname = getlogin();
|
| + if (!logname) return ENXIO; /* or...? */
|
| + if (strlen(logname) >= size) return ERANGE;
|
| + strcpy(name, logname);
|
| + return 0;
|
| +}
|
|
|