use lstat to get link info and allow compilation for systems without O_PATH
use lstat to get link info and allow compilation for systems without O_PATH

fopen might succeed now for links, giving an invalid file descriptor
read calls will fail for them. This will affect fingerprint generations
and the like. This should be taken into account when fully supporting
symlinks.

meganz/sdk,Acidburn0zzz/sdk,meganz/sdk,meganz/sdk,meganz/sdk,Acidburn0zzz/sdk,meganz/sdk,Acidburn0zzz/sdk,Acidburn0zzz/sdk,Acidburn0zzz/sdk,Acidburn0zzz/sdk,Acidburn0zzz/sdk,meganz/sdk,Acidburn0zzz/sdk,meganz/sdk