Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonish committed Nov 20, 2024
1 parent ef92477 commit 4c76017
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions rust/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,19 @@ check:
vendor:
CARGO_HOME="$(CARGO_HOME)" @rustup_home@ $(CARGO) vendor

gen/bindings.rs: $(abs_top_srcdir)/src/app-layer-types.h \
gen/bindgen.h: $(abs_top_srcdir)/src/app-layer-types.h \
$(abs_top_srcdir)/src/app-layer-protos.h
rm -f $@
rm -f gen/bindgen.h
for header in $^; do \
if HAVE_CYGPATH
echo "#include \"`cygpath -am $$header`\"" >> gen/bindgen.h \
else
echo "#include \"$$header\"" >> gen/bindgen.h; \
endif
done

gen/bindings.rs: gen/bindgen.h
rm -f $@
$(BINDGEN) \
-o $@ \
--allowlist-item 'AppProto.*' \
Expand All @@ -103,7 +109,7 @@ gen/bindings.rs: $(abs_top_srcdir)/src/app-layer-types.h \
--rustified-enum AppProtoEnum \
./gen/bindgen.h \
-- \
-DHAVE_CONFIG_H
-DHAVE_CONFIG_H -I../src

if HAVE_CBINDGEN
gen/rust-bindings.h: $(RUST_SURICATA_LIB)
Expand Down
3 changes: 2 additions & 1 deletion rust/src/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@

#![allow(non_camel_case_types)]
//include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
include!("../gen/bindings.rs");
//include!("../gen/bindings.rs");
include!(concat!(env!("CARGO_TARGET_DIR"), "/../gen/bindings.rs"));

0 comments on commit 4c76017

Please sign in to comment.