From b9d58fa723cd3789b8fb2475696a7c596fefc961 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Mon, 3 Jan 2022 16:14:45 -0500 Subject: [build] cmake,meson socket libs for win32, Illumos (fixes #3130) (thx devnexen) cmake, meson: specify socket libs for win32, Illumos x-ref: "Solaris build fix proposal" https://redmine.lighttpd.net/issues/3130 --- tests/meson.build | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'tests/meson.build') diff --git a/tests/meson.build b/tests/meson.build index ed4734d0..44355777 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,11 +1,22 @@ +compiler = meson.get_compiler('c') +socket_libs = [] +if target_machine.system() == 'windows' + socket_libs = [ compiler.find_library('ws2_32') ] +endif +if target_machine.system() == 'sunos' + socket_libs = [ compiler.find_library('socket') + , compiler.find_library('nsl') + ] +endif + executable('fcgi-responder', sources: 'fcgi-responder.c', - dependencies: common_flags, + dependencies: [ common_flags, socket_libs ] ) executable('scgi-responder', sources: 'scgi-responder.c', - dependencies: common_flags, + dependencies: [ common_flags, socket_libs ] ) env = environment() -- cgit v1.2.1