Skip to content

Commit

Permalink
meson: fix build on NixOS
Browse files Browse the repository at this point in the history
Fixes: lxc#4427
Signed-off-by: Alexander Mikhalitsyn <[email protected]>
  • Loading branch information
mihalicyn committed Apr 5, 2024
1 parent 0541631 commit ec948ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/lxc/cmd/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cmd_lxc_init_static_sources = files(
'../string_utils.c',
'../string_utils.h') + include_sources

cmd_lxc_monitord_sources = files('lxc_monitord.c') + include_sources + netns_ifaddrs_sources
cmd_lxc_monitord_sources = files('lxc_monitord.c') + include_sources
cmd_lxc_user_nic_sources = files('lxc_user_nic.c') + cmd_common_sources + netns_ifaddrs_sources
cmd_lxc_usernsexec_sources = files('lxc_usernsexec.c') + cmd_common_sources + netns_ifaddrs_sources

Expand Down Expand Up @@ -88,8 +88,8 @@ cmd_programs += executable(
'lxc-monitord',
cmd_lxc_monitord_sources,
include_directories: liblxc_includes,
dependencies: liblxc_dep,
link_with: [liblxc_static],
dependencies: liblxc_dependencies,
link_whole: [liblxc_static],
install: true,
install_dir: lxclibexec)

Expand Down
9 changes: 5 additions & 4 deletions src/lxc/tools/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: LGPL-2.1+

tools_common_sources = files('arguments.c', 'arguments.h') + include_sources + netns_ifaddrs_sources
tools_common_sources = files('arguments.c', 'arguments.h') + include_sources
tools_common_sources_for_dynamic_link = tools_common_sources + netns_ifaddrs_sources

tools_commands_dynamic_link = ['attach', 'autostart', 'cgroup', 'checkpoint', 'config',
'console', 'copy', 'create', 'destroy', 'device', 'execute', 'freeze',
Expand All @@ -15,7 +16,7 @@ if want_tools
foreach cmd : tools_commands_dynamic_link
public_programs += executable(
'lxc-' + cmd,
files('lxc_' + cmd + '.c') + tools_common_sources + liblxc_ext_sources,
files('lxc_' + cmd + '.c') + tools_common_sources_for_dynamic_link + liblxc_ext_sources,
dependencies: liblxc_dependencies,
include_directories: liblxc_includes,
c_args: ['-DNO_LXC_CONF'],
Expand All @@ -29,13 +30,13 @@ if want_tools
files('lxc_' + cmd + '.c') + tools_common_sources,
dependencies: liblxc_dependencies,
include_directories: liblxc_includes,
link_with: [liblxc_static],
link_whole: [liblxc_static],
install: true)
endforeach
endif

if want_tools_multicall
tools_all_sources = files('lxc_multicall.c') + tools_common_sources
tools_all_sources = files('lxc_multicall.c') + tools_common_sources_for_dynamic_link
foreach cmd : tools_commands
tools_all_sources += files('lxc_' + cmd + '.c')
endforeach
Expand Down

0 comments on commit ec948ad

Please sign in to comment.