lstat long path problem

Hi,
We are using lstat in our project.
But in case of the path length more than 1024, it's returning error ENAMETOOLONG. Is there any another system call which is supporting more than 1024 path and providing the same info as lstat.

Thanks

No. lstat() is it.

Try readlink(), then call stat on the path returned. It may also be that the actual filename itself is greater than NAME_MAX, rather than the path being greater than PATH_MAX. When lstat/stat fails, you should print the file specification that caused the error.

Jim, thanks for input.
But i like the substitute of lstat. So, i will get the same info as lstat but also support the long path.