unix: fix scandir filter prototype
The dirent argument is const on systems that conform to POSIX.2008 (Linux and Solaris) but non-const on others.
This commit is contained in:
parent
8399cb1fc3
commit
2d3760a17c
@ -154,7 +154,11 @@ static ssize_t uv__fs_read(uv_fs_t* req) {
|
||||
}
|
||||
|
||||
|
||||
#if defined(__linux__) || defined(__sun)
|
||||
static int uv__fs_readdir_filter(const struct dirent* dent) {
|
||||
#else
|
||||
static int uv__fs_readdir_filter(struct dirent* dent) {
|
||||
#endif
|
||||
return strcmp(dent->d_name, ".") != 0 && strcmp(dent->d_name, "..") != 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user