libc/ftw: Fix error: cast between incompatible function types from 'ftw_cb_t' nftw_cb_t
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I9e617ac04127e1e9126de2e3d32b35f2c6d636c0
This commit is contained in:
parent
e0ad381abc
commit
4df42ba9fb
@ -35,5 +35,12 @@ int ftw(FAR const char *path, ftw_cb_t fn, int fdlimit)
|
||||
* actually undefined, but works on all real-world machines.
|
||||
*/
|
||||
|
||||
return nftw(path, (nftw_cb_t)fn, fdlimit, FTW_PHYS);
|
||||
union
|
||||
{
|
||||
ftw_cb_t ftw;
|
||||
nftw_cb_t nftw;
|
||||
} u;
|
||||
|
||||
u.ftw = fn;
|
||||
return nftw(path, u.nftw, fdlimit, FTW_PHYS);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user