Fix build with new libewf https://github.com/simsong/bulk_extractor/commit/cba75d87b7091ffb344afbc4dad83cce52331ac3 --- configure.ac.orig +++ configure.ac @@ -366,7 +366,7 @@ [libewf=no])], [AC_MSG_WARN([libewf.h not found; no E01 support])] [libewf=no]) - AC_CHECK_FUNCS([libewf_handle_get_utf8_header_value_notes libewf_error_backtrace_fprint]) + AC_CHECK_FUNCS([libewf_handle_get_utf8_header_value_notes libewf_error_backtrace_fprint libewf_handle_close libewf_handle_free libewf_handle_read_buffer_at_offset libewf_handle_read_random]) fi AC_MSG_NOTICE([libewf is now $libewf]) --- src/image_process.cpp.orig +++ src/image_process.cpp @@ -322,7 +322,7 @@ process_ewf::~process_ewf() { -#ifdef LIBEWFNG +#ifdef HAVE_LIBEWF_HANDLE_CLOSE if(handle){ libewf_handle_close(handle,NULL); libewf_handle_free(&handle,NULL); @@ -340,7 +340,7 @@ char **libewf_filenames = NULL; int amount_of_filenames = 0; -#ifdef LIBEWFNG +#ifdef HAVE_LIBEWF_HANDLE_CLOSE libewf_error_t *error=0; if(libewf_glob(fname,strlen(fname),LIBEWF_FORMAT_UNKNOWN, &libewf_filenames,&amount_of_filenames,&error)<0){ @@ -416,9 +416,14 @@ //int process_ewf::debug = 0; int process_ewf::pread(unsigned char *buf,size_t bytes,int64_t offset) const { -#ifdef LIBEWFNG +#ifdef HAVE_LIBEWF_HANDLE_CLOSE libewf_error_t *error=0; +#if defined(HAVE_LIBEWF_HANDLE_READ_RANDOM) int ret = libewf_handle_read_random(handle,buf,bytes,offset,&error); +#endif +#if defined(HAVE_LIBEWF_HANDLE_READ_BUFFER_AT_OFFSET) && !defined(HAVE_LIBEWF_HANDLE_READ_RANDOM) + int ret = libewf_handle_read_buffer_at_offset(handle,buf,bytes,offset,&error); +#endif if(ret<0){ if (report_read_errors) libewf_error_fprint(error,stderr); libewf_error_free(&error);