8266087: Move 'buffer' declaration in get_user_name_slow() inside of linux specific code

Reviewed-by: zgu, dcubed
This commit is contained in:
Harold Seigel 2021-04-28 14:50:12 +00:00
parent ec383abc1d
commit f40bf1d240

View File

@ -527,10 +527,10 @@ static char* get_user_name_slow(int vmid, int nspid, TRAPS) {
// directory search
char* oldest_user = NULL;
time_t oldest_ctime = 0;
char buffer[MAXPATHLEN + 1];
int searchpid;
char* tmpdirname = (char *)os::get_temp_directory();
#if defined(LINUX)
char buffer[MAXPATHLEN + 1];
assert(strlen(tmpdirname) == 4, "No longer using /tmp - update buffer size");
// On Linux, if nspid != -1, look in /proc/{vmid}/root/tmp for directories