Mercurial > crates > nonstick
diff libpam-sys/libpam-sys-test/build.rs @ 114:93d423b65555
Ignore version-specific OpenPAM constants; generate signed ints.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 29 Jun 2025 03:30:51 -0400 |
parents | 178310336596 |
children |
line wrap: on
line diff
--- a/libpam-sys/libpam-sys-test/build.rs Sun Jun 29 03:11:33 2025 -0400 +++ b/libpam-sys/libpam-sys-test/build.rs Sun Jun 29 03:30:51 2025 -0400 @@ -3,7 +3,7 @@ use quote::{format_ident, ToTokens}; use std::path::PathBuf; use std::{env, fs}; -use syn::{Ident, Item, ItemConst, Path, Type, TypePath}; +use syn::{Item, ItemConst, Type, TypePath}; fn main() { generate_const_test(); @@ -31,7 +31,11 @@ "security/pam_appl.h".into(), "security/pam_constants.h".into(), ], - ignore_consts: vec!["OPENPAM_VERSION"], + ignore_consts: vec![ + "OPENPAM_VERSION".into(), + "OPENPAM_RELEASE".into(), + "PAM_SOEXT".into(), + ], } } @@ -49,7 +53,7 @@ .blocklist_type(".*") .blocklist_function(".*") .allowlist_var(".*") - .default_macro_constant_type(MacroTypeVariation::Unsigned); + .default_macro_constant_type(MacroTypeVariation::Signed); let generated = builder.generate().unwrap().to_string(); let file = syn::parse_file(&generated).unwrap();