Mercurial > crates > nonstick
annotate libpam-sys/build.rs @ 128:ad77f2af5ff4 default tip
Fix `rustc-check-cfg` in `libpam-sys/build.rs`.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Mon, 30 Jun 2025 23:00:53 -0400 |
parents | c77846f3a979 |
children |
rev | line source |
---|---|
127 | 1 use libpam_sys_impls::__pam_impl_enum__; |
2 use strum::{EnumIter, IntoEnumIterator}; | |
3 | |
4 __pam_impl_enum__!(#[derive(EnumIter)]); | |
5 | |
106
49d9e2b5c189
An irresponsible mix of implementing libpam-sys and other stuff.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
6 fn main() { |
49d9e2b5c189
An irresponsible mix of implementing libpam-sys and other stuff.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
7 println!("cargo:rustc-link-lib=pam"); |
127 | 8 let pam_impl_strs: Vec<_> = PamImpl::iter().map(|e| format!("\"{:?}\"", e)).collect(); |
9 let pam_impls = pam_impl_strs.join(","); | |
10 // We use this for ctest. Don't do what we've done; just use cfg_pam_impl. | |
128
ad77f2af5ff4
Fix `rustc-check-cfg` in `libpam-sys/build.rs`.
Paul Fisher <paul@pfish.zone>
parents:
127
diff
changeset
|
11 println!("cargo:rustc-check-cfg=cfg(_private_pam_impl_hack, values({pam_impls}))"); |
127 | 12 println!("cargo:rustc-cfg=_private_pam_impl_hack=\"{:?}\"", PamImpl::CURRENT); |
106
49d9e2b5c189
An irresponsible mix of implementing libpam-sys and other stuff.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
13 } |