diff --git a/libyara/proc/linux.c b/libyara/proc/linux.c index 72f2ab48bc..17b625d641 100644 --- a/libyara/proc/linux.c +++ b/libyara/proc/linux.c @@ -46,6 +46,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#ifdef HAVE_CONFIG_H +#include +#endif + typedef struct _YR_PROC_INFO { int pid; @@ -249,7 +253,7 @@ YR_API const uint8_t* yr_process_fetch_memory_block_data(YR_MEMORY_BLOCK* block) // target process VM. if (fd == -1) { - if (pread64( + if (pread( proc_info->mem_fd, (void*) context->buffer, block->size, @@ -265,7 +269,7 @@ YR_API const uint8_t* yr_process_fetch_memory_block_data(YR_MEMORY_BLOCK* block) { goto _exit; } - if (pread64( + if (pread( proc_info->pagemap_fd, pagemap, sizeof(uint64_t) * block->size / page_size, @@ -284,7 +288,7 @@ YR_API const uint8_t* yr_process_fetch_memory_block_data(YR_MEMORY_BLOCK* block) // swap-backed and if it differs from our mapping. uint8_t buffer[page_size]; - if (pread64( + if (pread( proc_info->mem_fd, buffer, page_size,