Define DEPRECATED_SCANF macro to use older scanf,sscanf,fscanf symbols

This commit is contained in:
gnzlbg 2019-05-15 16:44:07 +02:00
parent 0ae84518fe
commit 1a7ee21aec
1 changed files with 4 additions and 0 deletions

View File

@ -2257,6 +2257,10 @@ fn test_linux(target: &str) {
let mut cfg = ctest::TestGenerator::new();
// FIXME: still necessary?
cfg.define("_GNU_SOURCE", None);
// This macro re-deifnes fscanf,scanf,sscanf to link to the symbols that are
// deprecated since glibc >= 2.29. This allows Rust binaries to link against
// glibc versions older than 2.29.
cfg.define("DEPRECATED_SCANF", None);
// FIXME: still necessary?
cfg.flag("-Wno-deprecated-declarations");