From 59f40eb1a00822693aed3ea8294fba7d77f603ab Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 17 Oct 2018 21:04:51 +1100 Subject: [PATCH] sctp: link against ws2_32 on windows ext/sctp/ext@sctp@@gstsctp@sha/sctpassociation.c.obj: In function `receive_cb': /var/lib/jenkins/workspace/cerbero-cross-mingw32/workdir/sources/windows_x86/gst-plugins-bad-1.0-1.15.0.1/_builddir/../ext/sctp/sctpassociation.c:692: undefined reference to `_imp__ntohl@4' --- ext/sctp/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/sctp/meson.build b/ext/sctp/meson.build index fe697fe1d2..3e63a0811a 100644 --- a/ext/sctp/meson.build +++ b/ext/sctp/meson.build @@ -9,8 +9,13 @@ if get_option('sctp').disabled() subdir_done() endif +sctp_platform_deps = [] + sctp_dep = cc.find_library('usrsctp', required : get_option('sctp').enabled()) sctp_header = cc.has_header('usrsctp.h') +if host_system == 'windows' + sctp_platform_deps += [cc.find_library('ws2_32')] +endif if get_option('sctp').enabled() if not sctp_dep.found() or not sctp_header @@ -23,7 +28,7 @@ if sctp_dep.found() and sctp_header sctp_sources, c_args : gst_plugins_bad_args, include_directories : [configinc], - dependencies : [sctp_dep, gst_dep, gstbase_dep, gstsctp_dep], + dependencies : [sctp_dep, gst_dep, gstbase_dep, gstsctp_dep, sctp_platform_deps], install : true, install_dir : plugins_install_dir, )