From a2b42083e4cad95899832b841ac9f34c9a65ba4d Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Fri, 26 Sep 2025 15:30:22 -0700 Subject: [PATCH] subprojects: errno: support for windows This adds the support necessary to compile for windows. Reviewed-by: David Gilhooley --- subprojects/packagefiles/errno-0.3-rs/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/subprojects/packagefiles/errno-0.3-rs/meson.build b/subprojects/packagefiles/errno-0.3-rs/meson.build index 51c0edf6b55..dff4c84d073 100644 --- a/subprojects/packagefiles/errno-0.3-rs/meson.build +++ b/subprojects/packagefiles/errno-0.3-rs/meson.build @@ -8,13 +8,17 @@ project( license : 'MIT OR Apache-2.0', ) +os_deps = [] libc = subproject('libc-0.2-rs').get_variable('lib') +if host_machine.system() == 'windows' + os_deps += subproject('windows-sys-0.6-rs').get_variable('lib') +endif lib = static_library( 'libc_errno', 'src/lib.rs', override_options : ['rust_std=2018', 'build.rust_std=2018'], - link_with: [libc], + link_with: [libc] + os_deps, rust_abi : 'rust', )