summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorAlan Coopersmith <[email protected]>2019-11-05 16:56:46 -0800
committerMarge Bot <[email protected]>2020-01-22 20:23:51 +0000
commit8490b7d917c46951e3bc6708000fb542350b814b (patch)
treea3b0fa8fa37da50301433ea69972af9da1471d37 /meson.build
parent8f140422eddb8746cca49120dc8b763d1409d737 (diff)
intel/perf: adapt to platforms like Solaris without d_type in struct dirent
Signed-off-by: Alan Coopersmith <[email protected]> [Eric: factor out the is_dir_or_link() check and fix a bug in v1] Signed-off-by: Eric Engestrom <[email protected]> v3: include directory path when lstat'ing files v4: fix inverted check in enumerate_sysfs_metrics() Reviewed-by: Eric Engestrom <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2258> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2258>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 35cd2e6f632..2cf0ee7fe0c 100644
--- a/meson.build
+++ b/meson.build
@@ -1178,6 +1178,11 @@ if host_machine.system() != 'windows'
endif
endif
+if cc.has_member('struct dirent', 'd_type', prefix: '''#include <sys/types.h>
+ #include <dirent.h>''')
+ pre_args += '-DHAVE_DIRENT_D_TYPE'
+endif
+
# strtod locale support
if cc.links('''
#define _GNU_SOURCE