meson: Fix targetos match for illumos and Solaris.
authorJonathan Perkin <jonathan@perkin.org.uk>
Fri, 8 Sep 2023 17:45:42 +0000 (18:45 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 Sep 2023 07:33:51 +0000 (09:33 +0200)
qemu 8.1.0 breaks on illumos platforms due to _XOPEN_SOURCE and others no longer being set correctly, leading to breakage such as:

  https://us-central.manta.mnx.io/pkgsrc/public/reports/trunk/tools/20230908.1404/qemu-8.1.0/build.log

This is a result of meson conversion which incorrectly matches against 'solaris' instead of 'sunos' for uname.

First time submitting a patch here, hope I did it correctly.  Thanks.

Signed-off-by: Jonathan Perkin <jonathan@perkin.org.uk>
Message-ID: <ZPtdxtum9UVPy58J@perkin.org.uk>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
meson.build
net/meson.build

index 0e31bdfabf13adece9fc2bf33d1b8efdc0605634..5150a74831bacdbac02566da6cb9ae593b1ab00a 100644 (file)
@@ -226,7 +226,7 @@ if targetos == 'darwin'
   if compiler.get_id() == 'gcc'
     qemu_common_flags += '-DOS_OBJECT_USE_OBJC=0'
   endif
-elif targetos == 'solaris'
+elif targetos == 'sunos'
   # needed for CMSG_ macros in sys/socket.h
   qemu_common_flags += '-D_XOPEN_SOURCE=600'
   # needed for TIOCWIN* defines in termios.h
@@ -2048,7 +2048,7 @@ have_slirp_smbd = get_option('slirp_smbd') \
 if have_slirp_smbd
   smbd_path = get_option('smbd')
   if smbd_path == ''
-    smbd_path = (targetos == 'solaris' ? '/usr/sfw/sbin/smbd' : '/usr/sbin/smbd')
+    smbd_path = (targetos == 'sunos' ? '/usr/sfw/sbin/smbd' : '/usr/sbin/smbd')
   endif
   config_host_data.set_quoted('CONFIG_SMBD_COMMAND', smbd_path)
 endif
index d2d70634e5e3080d66dbd8eb7fd21917f046d884..51caa42c9d21d687b03e20a6338f70e847c623aa 100644 (file)
@@ -47,7 +47,7 @@ elif targetos == 'linux'
   system_ss.add(files('tap.c', 'tap-linux.c'))
 elif targetos in bsd_oses
   system_ss.add(files('tap.c', 'tap-bsd.c'))
-elif targetos == 'solaris'
+elif targetos == 'sunos'
   system_ss.add(files('tap.c', 'tap-solaris.c'))
 else
   system_ss.add(files('tap.c', 'tap-stub.c'))