Skip to content

Commit b70ab31

Browse files
author
Dorian Eikenberg
committed
Require yara 4.2
1 parent 529f9d3 commit b70ab31

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

plugins/inmemoryscanner/src/lib/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ target_include_directories(inmemoryscanner-obj INTERFACE $<BUILD_INTERFACE:${CMA
1414

1515
include(FindPkgConfig)
1616

17-
pkg_check_modules(YARA REQUIRED yara>=4)
17+
pkg_check_modules(YARA REQUIRED yara>=4.2)
1818
target_link_libraries(inmemoryscanner-obj PUBLIC ${YARA_LINK_LIBRARIES})
1919

20-
if (${YARA_VERSION} VERSION_GREATER_EQUAL 4.1)
21-
target_compile_definitions(inmemoryscanner-obj PRIVATE LIBYARA_4_1)
22-
endif ()
23-
2420
pkg_check_modules(TCLAP REQUIRED tclap>=1.2)
2521

2622
include(FetchContent)

plugins/inmemoryscanner/src/lib/YaraInterface.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,12 @@ namespace InMemoryScanner
7777
mappedRegion.mappingBase,
7878
&fetch_block_data);
7979
}
80-
#ifdef LIBYARA_4_1
80+
8181
YR_MEMORY_BLOCK_ITERATOR iterator{.context = &iteratorContext,
8282
.first = &get_first_block,
8383
.next = &get_next_block,
8484
.file_size = nullptr,
8585
.last_error = ERROR_SUCCESS};
86-
#else
87-
YR_MEMORY_BLOCK_ITERATOR iterator{
88-
.context = &iteratorContext, .first = &get_first_block, .next = &get_next_block};
89-
#endif
9086

9187
if (auto err = yr_rules_scan_mem_blocks(rules,
9288
&iterator,

0 commit comments

Comments
 (0)