From a89d412ced2d9498260dae34fa8aa9e28fa56ca8 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 23 Mar 2014 21:27:25 +0000 Subject: Provide fake getpwent_r to reduce changes from upstream --- libbb/lineedit.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 4bb1ab783..4cb9eba4b 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -672,18 +672,15 @@ static char *username_path_completion(char *ud) */ static NOINLINE unsigned complete_username(const char *ud) { -#if !ENABLE_PLATFORM_MINGW32 /* Using _r function to avoid pulling in static buffers */ char line_buff[256]; struct passwd pwd; struct passwd *result; -#endif unsigned userlen; ud++; /* skip ~ */ userlen = strlen(ud); -#if !ENABLE_PLATFORM_MINGW32 setpwent(); while (!getpwent_r(&pwd, line_buff, sizeof(line_buff), &result)) { /* Null usernames should result in all users as possible completions. */ @@ -692,7 +689,6 @@ static NOINLINE unsigned complete_username(const char *ud) } } endpwent(); -#endif return 1 + userlen; } -- cgit v1.2.3-55-g6feb