egl: Include stddef.h in generated source
[mesa.git] / meson.build
index 1c14f4ddd2991e934e17c3a33917fce28f184b03..20c40f1d22178f965928564c7a2b12712690765b 100644 (file)
@@ -1052,9 +1052,14 @@ elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() ==
 endif
 
 # Check for standard headers and functions
-if cc.has_header_symbol('sys/sysmacros.h', 'major')
+if (cc.has_header_symbol('sys/sysmacros.h', 'major') and
+  cc.has_header_symbol('sys/sysmacros.h', 'minor') and
+  cc.has_header_symbol('sys/sysmacros.h', 'makedev'))
   pre_args += '-DMAJOR_IN_SYSMACROS'
-elif cc.has_header_symbol('sys/mkdev.h', 'major')
+endif
+if (cc.has_header_symbol('sys/mkdev.h', 'major') and
+  cc.has_header_symbol('sys/mkdev.h', 'minor') and
+  cc.has_header_symbol('sys/mkdev.h', 'makedev'))
   pre_args += '-DMAJOR_IN_MKDEV'
 endif
 
@@ -1249,7 +1254,7 @@ if dep_libdrm.found()
 endif
 
 llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit']
-llvm_optional_modules = []
+llvm_optional_modules = ['coroutines']
 if with_amd_vk or with_gallium_radeonsi or with_gallium_r600
   llvm_modules += ['amdgpu', 'native', 'bitreader', 'ipo']
   if with_gallium_r600
@@ -1262,9 +1267,6 @@ if with_gallium_opencl
     'lto', 'option', 'objcarcopts', 'profiledata',
   ]
 endif
-if with_gallium_opencl or with_gallium_softpipe
-  llvm_optional_modules += ['coroutines']
-endif
 
 if with_amd_vk or with_gallium_radeonsi
   _llvm_version = '>= 8.0.0'