From b7397dc2aa1a93c4baaa624929211a917181db9f Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sat, 19 Mar 2011 13:58:05 +0100 Subject: [PATCH] Recent version of libewf have removed LIBEWF_HANDLE type, use libewf_handle_t is available --- compile.sh | 13 +++++++------ configure.ac | 4 ++++ src/ewf.c | 4 ++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/compile.sh b/compile.sh index 12c81c7c..98940f34 100755 --- a/compile.sh +++ b/compile.sh @@ -5,8 +5,8 @@ VER_E2FSPROGS= VER_PROGSREISERFS=0.3.1-rc8 VER_NTFSPROGS=2.0.0 -#VER_LIBEWF=20090510 VER_LIBEWF=20100226 +#VER_LIBEWF=20110312 smp_mflags="-j 2" crosscompile_target= prefix=/usr/ @@ -171,17 +171,18 @@ CONFIGUREOPT="$CONFIGUREOPT --with-ewf-lib=${PWDSRC}/libewf-${VER_LIBEWF}/libewf if [ ! -e $compiledir/libewf-$VER_LIBEWF/configure ]; then - if [ ! -e libewf-$VER_LIBEWF.tar.gz ]; + if [ ! -e libewf-$VER_LIBEWF.tar.gz -a ! -e libewf-alpha -$VER_LIBEWF.tar.gz -a ! -e libewf-beta-$VER_LIBEWF.tar.gz ]; then - if [ ! -e libewf-beta-$VER_LIBEWF.tar.gz ]; - then - $LYNX "http://sourceforge.net/project/platformdownload.php?group_id=167783" - fi + $LYNX "http://sourceforge.net/project/platformdownload.php?group_id=167783" fi if [ -e libewf-$VER_LIBEWF.tar.gz ]; then tar xzf libewf-$VER_LIBEWF.tar.gz -C $compiledir fi + if [ -e libewf-alpha-$VER_LIBEWF.tar.gz ]; + then + tar xzf libewf-alpha-$VER_LIBEWF.tar.gz -C $compiledir + fi if [ -e libewf-beta-$VER_LIBEWF.tar.gz ]; then tar xzf libewf-beta-$VER_LIBEWF.tar.gz -C $compiledir diff --git a/configure.ac b/configure.ac index 44cad859..0147bebd 100644 --- a/configure.ac +++ b/configure.ac @@ -633,6 +633,10 @@ if test -z "${use_ewf}"; then if test "${ac_cv_c_libewf_get_media_size_have_two_arguments}" != "no"; then AC_DEFINE([LIBEWF_GET_MEDIA_SIZE_HAVE_TWO_ARGUMENTS], 1, [Define if libewf_get_media_size takes two parameters.]) fi + AC_CHECK_TYPE( + [libewf_handle_t], + [AC_DEFINE( [HAVE_LIBEWF_HANDLE_T], [1], [Define to 1 if libewf_handle_t is available])],, + [#include ]) ],[ AC_MSG_WARN(No ewf library detected) ],[]) diff --git a/src/ewf.c b/src/ewf.c index 28fc33b8..d0bb0d67 100644 --- a/src/ewf.c +++ b/src/ewf.c @@ -65,7 +65,11 @@ static int fewf_sync(disk_t *disk); struct info_fewf_struct { +#ifdef HAVE_LIBEWF_HANDLE_T + libewf_handle_t *handle; +#else LIBEWF_HANDLE *handle; +#endif uint64_t offset; char file_name[DISKNAME_MAX]; int mode;