diff --git a/os/meson.build b/os/meson.build index e12e2c9e7..f8c060f08 100644 --- a/os/meson.build +++ b/os/meson.build @@ -60,6 +60,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'