From 1a7ee21aec68719df281300d77480eab4219e47a Mon Sep 17 00:00:00 2001 From: gnzlbg <gonzalobg88@gmail.com> Date: Wed, 15 May 2019 16:44:07 +0200 Subject: [PATCH] Define DEPRECATED_SCANF macro to use older scanf,sscanf,fscanf symbols --- libc-test/build.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 25eb8e1f..e4cf8eb6 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -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"); -- GitLab