https://bugzilla.redhat.com/show_bug.cgi?id=2075850
--- Comment #2 from Davide Cavalca dcavalca@fb.com --- This is failing to build on Rawhide: https://paste.centos.org/view/1a0986fb
/builddir/build/BUILD/zeek-4.2.0/src/script_opt/ZAM/Gen-ZAM.cc: In member function 'void TemplateInput::Gripe(const char*, const std::string&) const': /builddir/build/BUILD/zeek-4.2.0/src/script_opt/ZAM/Gen-ZAM.cc:1896:17: error: 'strlen' was not declared in this scope 1896 | int n = strlen(input_s); | ^~~~~~ /builddir/build/BUILD/zeek-4.2.0/src/script_opt/ZAM/Gen-ZAM.cc:7:1: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'? 6 | #include <regex> +++ |+#include <cstring> 7 | /builddir/build/BUILD/zeek-4.2.0/src/script_opt/ZAM/Gen-ZAM.cc: In constructor 'ZAMGen::ZAMGen(int, char**)': /builddir/build/BUILD/zeek-4.2.0/src/script_opt/ZAM/Gen-ZAM.cc:1922:18: error: 'strcmp' was not declared in this scope 1922 | auto f = strcmp(file_name, "-") ? fopen(file_name, "r") : stdin; | ^~~~~~ /builddir/build/BUILD/zeek-4.2.0/src/script_opt/ZAM/Gen-ZAM.cc:1922:18: note: 'strcmp' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
This looks like a missing include that's being triggered by GCC 12, and there's already an upstream fix for it in https://github.com/zeek/zeek/commit/acaa9ec01e00447b0deca37385f08797895b00b1 so it should be enough to backport that as a patch.