mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8202353: os::readdir should use readdir instead of readdir_r
8202835: jfr/event/os/TestSystemProcess.java fails on missing events Os::readdir uses POSIX readdir, drop buffer arg, fix JFR uses. Reviewed-by: coleenp, tschatzl, bsrbnd
This commit is contained in:
parent
f4723253b6
commit
9a9c824ece
22 changed files with 54 additions and 238 deletions
|
@ -3506,8 +3506,7 @@ bool os::dir_is_empty(const char* path) {
|
|||
|
||||
// Scan the directory
|
||||
bool result = true;
|
||||
char buf[sizeof(struct dirent) + MAX_PATH];
|
||||
while (result && (ptr = ::readdir(dir)) != NULL) {
|
||||
while (result && (ptr = readdir(dir)) != NULL) {
|
||||
if (strcmp(ptr->d_name, ".") != 0 && strcmp(ptr->d_name, "..") != 0) {
|
||||
result = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue