[Forensics-changes] [libewf] 01/02: Fix FTBFS on hurd-386 (Closes: #754816)
Pierre Chifflier
pollux at moszumanska.debian.org
Wed Aug 27 07:26:23 UTC 2014
This is an automated email from the git hooks/post-receive script.
pollux pushed a commit to branch debian
in repository libewf.
commit a3bfeb6569862e570054620a8abab7081486b623
Author: Pierre Chifflier <pollux at debian.org>
Date: Wed Aug 27 09:22:06 2014 +0200
Fix FTBFS on hurd-386 (Closes: #754816)
---
debian/patches/03-fix-FTBFS-hurd-386.patch | 85 ++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 86 insertions(+)
diff --git a/debian/patches/03-fix-FTBFS-hurd-386.patch b/debian/patches/03-fix-FTBFS-hurd-386.patch
new file mode 100644
index 0000000..da55f4c
--- /dev/null
+++ b/debian/patches/03-fix-FTBFS-hurd-386.patch
@@ -0,0 +1,85 @@
+Index: libewf/libcpath/libcpath_path.c
+===================================================================
+--- libewf.orig/libcpath/libcpath_path.c
++++ libewf/libcpath/libcpath_path.c
+@@ -338,40 +338,12 @@ int libcpath_path_get_current_working_di
+
+ return( -1 );
+ }
+- *current_working_directory_size = (size_t) PATH_MAX;
+-
+- *current_working_directory = libcstring_narrow_string_allocate(
+- *current_working_directory_size );
+
++ *current_working_directory = getcwd(
++ NULL,
++ 0 );
+ if( *current_working_directory == NULL )
+ {
+- libcerror_error_set(
+- error,
+- LIBCERROR_ERROR_DOMAIN_MEMORY,
+- LIBCERROR_MEMORY_ERROR_INSUFFICIENT,
+- "%s: unable to create current working directory.",
+- function );
+-
+- goto on_error;
+- }
+- if( memory_set(
+- *current_working_directory,
+- 0,
+- sizeof( char ) * *current_working_directory_size ) == NULL )
+- {
+- libcerror_error_set(
+- error,
+- LIBCERROR_ERROR_DOMAIN_MEMORY,
+- LIBCERROR_MEMORY_ERROR_SET_FAILED,
+- "%s: unable to clear current working directory.",
+- function );
+-
+- goto on_error;
+- }
+- if( getcwd(
+- *current_working_directory,
+- *current_working_directory_size ) == NULL )
+- {
+ libcerror_system_set_error(
+ error,
+ LIBCERROR_ERROR_DOMAIN_RUNTIME,
+@@ -382,6 +354,8 @@ int libcpath_path_get_current_working_di
+
+ goto on_error;
+ }
++ *current_working_directory_size = 1 + libcstring_narrow_string_length(
++ *current_working_directory );
+ return( 1 );
+
+ on_error:
+@@ -3036,23 +3010,10 @@ int libcpath_path_get_current_working_di
+
+ return( -1 );
+ }
+- narrow_current_working_directory = libcstring_narrow_string_allocate(
+- PATH_MAX );
+-
+- if( narrow_current_working_directory == NULL )
+- {
+- libcerror_error_set(
+- error,
+- LIBCERROR_ERROR_DOMAIN_MEMORY,
+- LIBCERROR_MEMORY_ERROR_INSUFFICIENT,
+- "%s: unable to create narrow current working directory.",
+- function );
+-
+- goto on_error;
+- }
+- if( getcwd(
+- narrow_current_working_directory,
+- PATH_MAX ) == NULL )
++ narrow_current_working_directory = getcwd(
++ NULL,
++ 0 );
++ if( narrow_current_working_directory == NULL)
+ {
+ libcerror_system_set_error(
+ error,
diff --git a/debian/patches/series b/debian/patches/series
index fca7ddc..aeda28d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
01_fix_libbfio_check.patch
02-fix-pkgconfig-mfcache-error.patch
+03-fix-FTBFS-hurd-386.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/libewf.git
More information about the forensics-changes
mailing list