]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: add auto-generated header to sys.rs
authorJason Ish <jason.ish@oisf.net>
Fri, 24 Jan 2025 15:05:03 +0000 (09:05 -0600)
committerVictor Julien <victor@inliniac.net>
Mon, 17 Feb 2025 06:31:29 +0000 (07:31 +0100)
We don't keep bindgen's autogenerated do not edit line as it contains
the bindgen version which could break the CI check for out of date
bindings. So add our own do not edit line.

Ticket: #7341

rust/Makefile.am
rust/sys/src/sys.rs

index c96724f01f1bc79cf5fe769420f68122bf71bcd6..b1791b001d99d71c83a6c08e9ff0285b9fe94c4c 100644 (file)
@@ -117,6 +117,7 @@ if HAVE_BINDGEN
                $(abs_top_srcdir)/src/bindgen.h \
                -- \
                -DHAVE_CONFIG_H -I../src -I../rust/gen $(CPPFLAGS)
+       sed -i '1i\// This file is automatically generated. Do not edit.\n' sys/src/sys.rs
 else
        @echo "error: bindgen not installed, can't update bindings"
        exit 1
index 61c35d8d2e21bdfde9042f9a42a053a923d43dc0..1c358f7b5a15c1dc05c36abd0e05bcb85bd038d8 100644 (file)
@@ -1,3 +1,5 @@
+// This file is automatically generated. Do not edit.
+
 #[repr(u32)]
 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
 pub enum AppProtoEnum {