endif
endforeach
+# getsockname(), getpeername() might be in -lnsl, for example on older Solaris
+foreach function : ['getsockname', 'getpeername']
+ if not cc.has_function(
+ function,
+ args: compile_args_c,
+ dependencies: network_libs,
+ )
+ nsl_lib = cc.find_library('nsl', required: false)
+ if nsl_lib.found() and cc.has_function(
+ function,
+ args: compile_args_c,
+ dependencies: network_libs + [nsl_lib],
+ )
+ network_libs += [nsl_lib]
+ break
+ endif
+ endif
+endforeach
+
if get_option('x11_autolaunch').disabled()
use_x11_autolaunch = false
x11 = not_found
dbus_cleanup_sockets = executable('dbus-cleanup-sockets',
'dbus-cleanup-sockets.c',
include_directories: root_include,
+ dependencies: network_libs,
install: true,
)
endif
'dbus-monitor.c',
'tool-common.c',
include_directories: root_include,
+ dependencies: network_libs,
link_with: libdbus,
install: true,
)
'dbus-send.c',
'tool-common.c',
include_directories: root_include,
+ dependencies: network_libs,
link_with: libdbus,
install: true,
)