]> git.ipfire.org Git - thirdparty/suricata.git/commit
rust: fix unit test link error on Rust 1.70 9009/head
authorJason Ish <jason.ish@oisf.net>
Mon, 12 Jun 2023 16:29:00 +0000 (10:29 -0600)
committerVictor Julien <vjulien@oisf.net>
Mon, 12 Jun 2023 20:05:53 +0000 (22:05 +0200)
commit68d0d6ca24780ac7c5d8b9d3d9d465371cafc179
treef4d2795811b4c23a364f17b6d2369d9af63b090e
parentc90f67ac55bd2bae6efabb2dcde7677336fa1773
rust: fix unit test link error on Rust 1.70

Rust 1.70 appears to now link code on both branches of `if cfg!(test)`
now causing Rust unit tests to fail as that pattern was used to
disable functions only available when linked with the Suricata C code.

To work-around this issue, provide two versions of the `new` function,
one for unit tests and one when running as an application.
rust/src/frames.rs