sleuthkit: rebuild against libewf.so.3

This commit is contained in:
maxice8 2019-01-11 01:59:59 -02:00 committed by maxice8
parent 42f01aa18c
commit 6e8a66382e
2 changed files with 52 additions and 1 deletions

View file

@ -0,0 +1,51 @@
From 3b4d908ece7abe06e06cbe08bb3dad5285fa774d Mon Sep 17 00:00:00 2001
From: Dan Church <amphetamachine@gmail.com>
Date: Mon, 18 Dec 2017 11:50:42 -0600
Subject: [PATCH] Fix libewf V2 API support
`libewf_handle_read_random` was removed in
libyal/libewf@54f8d8ffb67ea3808336204d5a072db358066ec5, but at that
point it was just a wrapper for
`libewf_handle_read_buffer_at_offset`.[1]
Solution: Replace deprecated libewf_handle_read_random call with the
recommended[2] replacement.
References:
1. https://github.com/libyal/libewf/commit/54f8d8ffb67ea3808336204d5a072db358066ec5#diff-b9e76700775f6f9aa3efde388cb3bba9L74
2. https://github.com/libyal/libewf/commit/54f8d8ffb67ea3808336204d5a072db358066ec5#diff-fedcd7a7973ead791242e3a6d86e1a15L802
---
tsk/img/ewf.c | 2 +-
tsk/img/ewf.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tsk/img/ewf.c b/tsk/img/ewf.c
index 64d1c1bc4c..2df817619f 100644
--- tsk/img/ewf.c
+++ tsk/img/ewf.c
@@ -64,7 +64,7 @@ ewf_image_read(TSK_IMG_INFO * img_info, TSK_OFF_T offset, char *buf,
tsk_take_lock(&(ewf_info->read_lock));
#if defined( HAVE_LIBEWF_V2_API )
- cnt = libewf_handle_read_random(ewf_info->handle,
+ cnt = libewf_handle_read_buffer_at_offset(ewf_info->handle,
buf, len, offset, &ewf_error);
if (cnt < 0) {
char *errmsg = NULL;
diff --git a/tsk/img/ewf.h b/tsk/img/ewf.h
index 08752e14e1..0ed86337e3 100644
--- tsk/img/ewf.h
+++ tsk/img/ewf.h
@@ -20,9 +20,9 @@
#include <libewf.h>
-// libewf version 2 no longer defines LIBEWF_HANDLE
+// libewf version 2 no longer defines LIBEWF_OPEN_READ_WRITE
#undef HAVE_LIBEWF_V2_API
-#if !defined( LIBEWF_HANDLE )
+#if !defined( LIBEWF_OPEN_READ_WRITE )
#define HAVE_LIBEWF_V2_API
#endif

View file

@ -1,7 +1,7 @@
# Template file for 'sleuthkit'
pkgname=sleuthkit
version=4.6.4
revision=2
revision=3
wrksrc="${pkgname}-${pkgname}-${version}"
build_style=gnu-configure
hostmakedepends="automake libtool"