From cdd49714f7023d83ffe0b939953e3460e4192c22 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Wed, 20 Nov 2024 09:12:38 -0600 Subject: [PATCH] fixup --- rust/Makefile.am | 3 ++- rust/src/build.rs | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/rust/Makefile.am b/rust/Makefile.am index 99efed0c831d..3c0ce75cafab 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -38,7 +38,8 @@ CARGO_VARS = TOP_BUILDDIR=$(abs_top_builddir) \ TOP_SRCDIR=$(abs_top_srcdir) \ CARGO_TARGET_DIR="$(abs_top_builddir)/rust/target" \ SURICATA_LUA_SYS_HEADER_DST="$(abs_top_builddir)/rust/gen" \ - CFLAGS="$(CFLAGS)" + CFLAGS="$(CFLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" all-local: Cargo.toml mkdir -p $(abs_top_builddir)/rust/gen diff --git a/rust/src/build.rs b/rust/src/build.rs index 86bb6d0430b3..55df182ebe22 100644 --- a/rust/src/build.rs +++ b/rust/src/build.rs @@ -17,6 +17,10 @@ fn main() { .clang_arg("-D__SCFILENAME__=\"\"") .clang_arg(format!("-I{}/src", &build_dir)); + if let Ok(cppflags) = std::env::var("CPPFLAGS") { + builder = builder.clang_arg(cppflags); + } + let headers = &["app-layer-types.h", "app-layer-protos.h"]; for header in headers { builder = builder.header(format!("{}/src/{}", &src_dir, header));