]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
meson: host_os needs to check for 'sunos', not 'solaris'
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Sat, 16 Aug 2025 22:37:51 +0000 (15:37 -0700)
committerSimon McVittie <smcv@collabora.com>
Tue, 19 Aug 2025 12:34:00 +0000 (12:34 +0000)
https://mesonbuild.com/Reference-tables.html#operating-system-names
documents 'sunos' as the return value from .system() on Solaris & illumos

Based on patch from Jonathan Perkins for pkgsrc in:
https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/dbus/patches/patch-meson.build?rev=1.2
but modified to add a new platform_sunos symbol as suggested by @smcv

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
meson.build

index 4ce2382643520b0151ae0172587669e749c3add9..3b71d46831d573342d0bccb6d96d3db65063ec3b 100644 (file)
@@ -108,6 +108,9 @@ platform_win32ce = host_os.contains('mingw32ce')
 
 platform_unix = not platform_windows
 
+# "sunos" is either Solaris or illumos in meson
+platform_sunos = (host_os == 'sunos')
+
 config.set('DBUS_UNIX',   platform_unix)
 config.set('DBUS_CYGWIN', platform_cygwin)
 config.set('DBUS_WIN',    platform_windows)
@@ -173,7 +176,7 @@ compile_args = [
 # See https://gitlab.freedesktop.org/dbus/dbus/-/issues/4
 compile_args += ['-fno-strict-aliasing']
 
-if host_os.contains('solaris')
+if platform_sunos
     compile_args += [
         # Solaris' C library apparently needs these runes to be threadsafe...
         '-D_POSIX_PTHREAD_SEMANTICS',
@@ -561,8 +564,8 @@ endif
 have_console_owner_file = false
 console_owner_file = get_option('solaris_console_owner_file')
 if console_owner_file != ''
-  if not host_os.contains('solaris')
-    error('solaris_console_owner_file is only supported on Solaris)')
+  if not platform_sunos
+    error('solaris_console_owner_file is only supported on Solaris or illumos')
   endif
   have_console_owner_file = true
   if console_owner_file == 'auto'
@@ -1414,7 +1417,7 @@ if platform_unix
     }
 endif
 
-if host_os.contains('solaris')
+if platform_sunos
   summary_dict += {
       'Console owner file': console_owner_file,
   }