meson: GNU/kFreeBSD has DRM/KMS and requires -D_GNU_SOURCE
authorJames Clarke <jrtc27@jrtc27.com>
Sat, 4 May 2019 20:54:40 +0000 (21:54 +0100)
committerEric Engestrom <eric@engestrom.ch>
Fri, 28 Jun 2019 19:06:46 +0000 (19:06 +0000)
This is a regression from the old autotools build system.

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
meson.build

index 432b3f4ea871d671421c1413a1f420a7204bc1f5..2da66b749245b45f7a62c67998643c8268dee098 100644 (file)
@@ -107,7 +107,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2
 # Only build shared_glapi if at least one OpenGL API is enabled
 with_shared_glapi = get_option('shared-glapi') and with_any_opengl
 
-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 'linux'].contains(host_machine.system())
+system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux'].contains(host_machine.system())
 
 dri_drivers = get_option('dri-drivers')
 if dri_drivers.contains('auto')
@@ -832,7 +832,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }',
 endif
 
 # TODO: this is very incomplete
-if ['linux', 'cygwin', 'gnu'].contains(host_machine.system())
+if ['linux', 'cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system())
   pre_args += '-D_GNU_SOURCE'
 endif