diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build
index 29ea315682d8b80f5cb567758f6e81b3626b5684..c4db85cdb69ca19320f3a33bd6e0f31f53dcc0ab 100644
--- a/hw/xfree86/meson.build
+++ b/hw/xfree86/meson.build
@@ -75,7 +75,7 @@ endif
 
 if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
     linker_export_flags = '-Wl,--export-all-symbols'
-elif host_machine.system() == 'sunos'
+elif host_machine.system() == 'sunos' or host_machine.system() == 'darwin'
     linker_export_flags = []
 else
     linker_export_flags = '-Wl,--export-dynamic'
diff --git a/meson.build b/meson.build
index db1d63f3e8fa8fdf698129c9169165fb69195579..0793f0e54061d0037bb3f47aa5324ab23bd686de 100644
--- a/meson.build
+++ b/meson.build
@@ -184,8 +184,7 @@ if with_dtrace
 endif
 
 build_xorg = false
-if (host_machine.system() != 'darwin' and
-    host_machine.system() != 'windows')
+if (host_machine.system() != 'windows')
     if get_option('xorg') == 'auto'
         build_xorg = (host_machine.system() != 'darwin' and
                       host_machine.system() != 'windows')
@@ -230,8 +229,7 @@ if (host_machine.system() != 'darwin' and
 endif
 
 build_xnest = false
-if (host_machine.system() != 'darwin' and
-    host_machine.system() != 'windows')
+if (host_machine.system() != 'windows')
     if get_option('xnest') != 'false'
         xnest_required = get_option('xnest') == 'true'