[PATCH libdrm v2 4/4] meson.build: Fix meson script on FreeBSD
Emil Velikov
emil.l.velikov at gmail.com
Sun Jun 16 13:23:43 UTC 2019
From: Niclas Zeising <zeising at daemonic.se>
FreeBSD requires sys/types.h for sys/sysctl.h, add it as part of the
includes when checking for headers.
Instead of splitting out the check for sys/sysctl.h from the other
header checks, just add sys/types.h to all header checks.
v2 [Emil]
- add inline comment
- drop bash/sh hunk
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index ed407009..14f82b1f 100644
--- a/meson.build
+++ b/meson.build
@@ -179,9 +179,12 @@ else
dep_rt = []
endif
dep_m = cc.find_library('m', required : false)
+# From Niclas Zeising:
+# FreeBSD requires sys/types.h for sys/sysctl.h, add it as part of the
+# includes when checking for headers.
foreach header : ['sys/sysctl.h', 'sys/select.h', 'alloca.h']
config.set('HAVE_' + header.underscorify().to_upper(),
- cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header)))
+ cc.compiles('#include <sys/types.h>\n#include <@0@>'.format(header), name : '@0@ works'.format(header)))
endforeach
if cc.has_header_symbol('sys/sysmacros.h', 'major')
config.set10('MAJOR_IN_SYSMACROS', true)
--
2.21.0
More information about the dri-devel
mailing list