intel/perf: adapt to platforms like Solaris without d_type in struct dirent
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Wed, 6 Nov 2019 00:56:46 +0000 (16:56 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 22 Jan 2020 20:23:51 +0000 (20:23 +0000)
commit8490b7d917c46951e3bc6708000fb542350b814b
treea3b0fa8fa37da50301433ea69972af9da1471d37
parent8f140422eddb8746cca49120dc8b763d1409d737
intel/perf: adapt to platforms like Solaris without d_type in struct dirent

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
[Eric: factor out the is_dir_or_link() check and fix a bug in v1]
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
v3: include directory path when lstat'ing files
v4: fix inverted check in enumerate_sysfs_metrics()

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2258>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2258>
meson.build
src/intel/perf/gen_perf.c