diff --git a/subprojects/gst-plugins-bad/ext/curl/meson.build b/subprojects/gst-plugins-bad/ext/curl/meson.build index c14504f0ad..85f59a9d6c 100644 --- a/subprojects/gst-plugins-bad/ext/curl/meson.build +++ b/subprojects/gst-plugins-bad/ext/curl/meson.build @@ -23,7 +23,7 @@ if curl_dep.found() curl_sources, c_args : gst_plugins_bad_args, include_directories : [configinc, libsinc], - dependencies : [gstbase_dep, curl_dep] + winsock2, + dependencies : [gstbase_dep, curl_dep] + winsock2 + network_deps, install : true, install_dir : plugins_install_dir, ) diff --git a/subprojects/gst-plugins-bad/gst/festival/meson.build b/subprojects/gst-plugins-bad/gst/festival/meson.build index aab9624d28..ab77c074ed 100644 --- a/subprojects/gst-plugins-bad/gst/festival/meson.build +++ b/subprojects/gst-plugins-bad/gst/festival/meson.build @@ -6,7 +6,7 @@ gstfestival = library('gstfestival', festival_sources, c_args : gst_plugins_bad_args, include_directories : [configinc], - dependencies : [gstbase_dep, gstaudio_dep] + winsock2, + dependencies : [gstbase_dep, gstaudio_dep] + winsock2 + network_deps, install : true, install_dir : plugins_install_dir, ) diff --git a/subprojects/gst-plugins-bad/meson.build b/subprojects/gst-plugins-bad/meson.build index 7339156b97..9f15788eaa 100644 --- a/subprojects/gst-plugins-bad/meson.build +++ b/subprojects/gst-plugins-bad/meson.build @@ -377,6 +377,20 @@ if x11_dep.found() cdata.set('HAVE_X11', 1) endif +# +# Solaris and Illumos distros split a lot of networking-related code +# into '-lsocket -lnsl'. Anything that calls socketpair(), getifaddr(), +# etc. probably needs to include network_deps +# +if host_machine.system() == 'sunos' + network_deps = [ + cc.find_library('socket', required: false), + cc.find_library('nsl', required: false) + ] +else + network_deps = [] +endif + if host_machine.system() == 'windows' winsock2 = [cc.find_library('ws2_32')] else diff --git a/subprojects/gst-plugins-bad/sys/shm/meson.build b/subprojects/gst-plugins-bad/sys/shm/meson.build index 6c6493e8d1..8445e1fa02 100644 --- a/subprojects/gst-plugins-bad/sys/shm/meson.build +++ b/subprojects/gst-plugins-bad/sys/shm/meson.build @@ -36,7 +36,7 @@ if shm_enabled shm_sources, c_args : gst_plugins_bad_args + ['-DSHM_PIPE_USE_GLIB'], include_directories : [configinc], - dependencies : [gstbase_dep, rt_dep], + dependencies : [gstbase_dep, rt_dep] + network_deps, install : true, install_dir : plugins_install_dir, )