os: fix link failure on Illumos

On SunOS, the BSD socket API as well as hostname lookups isn't
implemented in libc, but separate libraries. We need to link them
explicitly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-06-27 12:04:24 +02:00
parent 1708c689a8
commit f3faa4c84d

View File

@ -65,6 +65,8 @@ if host_machine.system() == 'sunos'
os_c_args += '-D_XOPEN_SOURCE=1' os_c_args += '-D_XOPEN_SOURCE=1'
os_c_args += '-D_XOPEN_SOURCE_EXTENDED=1' os_c_args += '-D_XOPEN_SOURCE_EXTENDED=1'
os_c_args += '-D__EXTENSIONS__' os_c_args += '-D__EXTENSIONS__'
os_dep += cc.find_library('socket')
os_dep += cc.find_library('nsl')
endif endif
if get_option('xres') if get_option('xres')