--- gst-plugins-base-1.26.2/gst-libs/gst/rtsp/meson.build.orig
+++ gst-plugins-base-1.26.2/gst-libs/gst/rtsp/meson.build
@@ -57,7 +57,7 @@
   soversion : soversion,
   darwin_versions : osxversion,
   install : true,
-  dependencies : gstrtsp_deps,
+  dependencies : gstrtsp_deps + network_deps,
 )
 
 library_def = {'lib': gst_rtsp}
--- gst-plugins-base-1.26.2/meson.build.orig
+++ gst-plugins-base-1.26.2/meson.build
@@ -321,6 +321,21 @@
 
 core_conf.set('HAVE_LIBDRM', libdrm_dep.found())
 
+#
+# 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
+#
+socket_lib = cc.find_library('socket', required: false)
+nsl_lib    = cc.find_library('nsl',    required: false)
+network_deps = []
+if socket_lib.found()
+  network_deps += socket_lib
+endif
+if nsl_lib.found()
+  network_deps += nsl_lib
+endif
+
 # X11 checks are for sys/ and tests/
 x11_dep = dependency('x11', required : get_option('x11'))
 # GIO is used by the GIO plugin, and by the TCP, SDP, and RTSP plugins
--- gst-plugins-base-1.26.2/gst/tcp/meson.build.orig
+++ gst-plugins-base-1.26.2/gst/tcp/meson.build
@@ -45,7 +45,7 @@
   tcp_sources,
   c_args : gst_plugins_base_args,
   include_directories: [configinc, libsinc],
-  dependencies : [gst_base_dep, gst_net_dep, gio_dep],
+  dependencies : [gst_base_dep, gst_net_dep, gio_dep, network_deps],
   install : true,
   install_dir : plugins_install_dir,
 )
--- gst-plugins-base-1.26.2/tests/check/meson.build.orig
+++ gst-plugins-base-1.26.2/tests/check/meson.build
@@ -70,9 +70,9 @@
     [ 'libs/rtspconnection.c' ],
     [ 'elements/libvisual.c', not is_variable('libvisual_dep') or not libvisual_dep.found() ],
     [ 'elements/encodebin.c', not theoraenc_dep.found() or not vorbisenc_dep.found() ],
-    [ 'elements/multifdsink.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H') ],
+    [ 'elements/multifdsink.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H'), [ network_deps ] ],
     # FIXME: multisocketsink test on windows/msvc
-    [ 'elements/multisocketsink.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H') ],
+    [ 'elements/multisocketsink.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H'), [ network_deps ] ],
     [ 'elements/playbin-complex.c', not ogg_dep.found() ],
     [ 'elements/textoverlay.c', not pango_dep.found() ],
     [ 'elements/theoradec.c', not ogg_dep.found() or not theoradec_dep.found() ],
@@ -80,7 +80,7 @@
     [ 'elements/vorbistag.c', not vorbisenc_dep.found(), [ vorbis_dep, vorbisenc_dep ] ],
     [ 'pipelines/oggmux.c', not ogg_dep.found(), [ ogg_dep, ] ],
     # FIXME: tcp test on windows/msvc
-    [ 'pipelines/tcp.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H'), [giounix_dep] ],
+    [ 'pipelines/tcp.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H'), [ giounix_dep, network_deps ] ],
     [ 'pipelines/theoraenc.c', not theoraenc_dep.found(), [ theoraenc_dep ] ],
     [ 'pipelines/vorbisenc.c', not vorbisenc_dep.found() ],
     [ 'pipelines/vorbisdec.c', not vorbisenc_dep.found() ],