diff --git a/os/meson.build b/os/meson.build index 38d3d2fae..4acd52071 100644 --- a/os/meson.build +++ b/os/meson.build @@ -59,6 +59,13 @@ endif os_dep = [] os_c_args = [] +# eg. struct msghdr -> msg_control +if host_machine.system() == 'sunos' + os_c_args += '-D_XOPEN_SOURCE=1' + os_c_args += '-D_XOPEN_SOURCE_EXTENDED=1' + os_c_args += '-D__EXTENSIONS__' +endif + if get_option('xres') # Only the XRes extension cares about the client ID. os_c_args += '-DCLIENTIDS'