From f02e60409bdc18932e8ada265ff20f729fef2d42 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Fri, 30 May 2025 13:25:09 -0700 Subject: [PATCH] subprojects: add errno Version 0.3.12 in: - Fedora (https://packages.fedoraproject.org/pkgs/rust-errno/rust-errno+default-devel/) - AOSP (0.3.8, but should still work) Acked-by: Aaron Ruby Reviewed-by: @LingMan Part-of: --- subprojects/errno.wrap | 6 ++++++ subprojects/packagefiles/errno/meson.build | 24 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 subprojects/errno.wrap create mode 100644 subprojects/packagefiles/errno/meson.build diff --git a/subprojects/errno.wrap b/subprojects/errno.wrap new file mode 100644 index 00000000000..aa3444bfe75 --- /dev/null +++ b/subprojects/errno.wrap @@ -0,0 +1,6 @@ +[wrap-file] +directory = errno-0.3.12 +source_url = https://crates.io/api/v1/crates/errno/0.3.12/download +source_filename = errno-0.3.12.tar.gz +source_hash = cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18 +patch_directory = errno diff --git a/subprojects/packagefiles/errno/meson.build b/subprojects/packagefiles/errno/meson.build new file mode 100644 index 00000000000..b0eab2221f0 --- /dev/null +++ b/subprojects/packagefiles/errno/meson.build @@ -0,0 +1,24 @@ +# Copyright © 2025 Google +# SPDX-License-Identifier: MIT + +project( + 'errno', + 'rust', + version : '0.3.12', + license : 'MIT OR Apache-2.0', +) + +libc = subproject('libc').get_variable('lib') + +lib = static_library( + 'libc_errno', + 'src/lib.rs', + override_options : ['rust_std=2018', 'build.rust_std=2018'], + link_with: [libc], + rust_abi : 'rust', + native : true, +) + +dep_errno = declare_dependency( + link_with : [lib] +)