# HG changeset patch # User Paul Fisher # Date 1751182251 14400 # Node ID 93d423b65555b1f6330d6bd3be59927875611927 # Parent 178310336596e5c4c823914a6f5ff46feecaace0 Ignore version-specific OpenPAM constants; generate signed ints. diff -r 178310336596 -r 93d423b65555 libpam-sys/libpam-sys-test/build.rs --- 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();