diff options
Diffstat (limited to 'compat/mingw.c')
-rw-r--r-- | compat/mingw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index f869999a5..0e1ddbe4d 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -75,7 +75,15 @@ char *mingw_getcwd(char *pointer, int len) struct passwd *getpwuid(int uid) { + static char user_name[100]; static struct passwd p; + + DWORD len = sizeof(user_name); + if (!GetUserName(user_name, &len)) + return NULL; + p.pw_name = user_name; + p.pw_gecos = "unknown"; + p.pw_dir = NULL; return &p; } |