This is my nftw
function, it works correctly before specifying flags FTW_DEPTH
and FTW_PHYS
:
if (nftw(argv[1], visit, 64, FTW_DEPTH | FTW_PHYS) != 0)
{
perror("nftw");
}
Also I have defined visit as:
int visit(const char *path, const struct stat *stat, int flags)
{
...
return 0;
}
BUT after compilation it gives error:
‘FTW_DEPTH’ undeclared (first use in this function)