[Forensics-changes] [libpff] 04/05: Fix FTBFS on hurd-386 (Closes: #754818)

Pierre Chifflier pollux at moszumanska.debian.org
Thu Aug 28 07:04:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

pollux pushed a commit to branch master
in repository libpff.

commit 3b08fdfd1517d7e656ff526e3ec24c5c093e1130
Author: Pierre Chifflier <pollux at debian.org>
Date:   Thu Aug 28 08:58:42 2014 +0200

    Fix FTBFS on hurd-386 (Closes: #754818)
---
 debian/patches/01-fix-FTBFS-hurd-386.patch | 76 ++++++++++++++++++++++++++++++
 debian/patches/series                      |  1 +
 2 files changed, 77 insertions(+)

diff --git a/debian/patches/01-fix-FTBFS-hurd-386.patch b/debian/patches/01-fix-FTBFS-hurd-386.patch
new file mode 100644
index 0000000..181712b
--- /dev/null
+++ b/debian/patches/01-fix-FTBFS-hurd-386.patch
@@ -0,0 +1,76 @@
+Index: libpff/libcpath/libcpath_path.c
+===================================================================
+--- libpff.orig/libcpath/libcpath_path.c
++++ libpff/libcpath/libcpath_path.c
+@@ -342,12 +342,6 @@ int libcpath_path_get_current_working_di
+ 	}
+ #if defined( WINAPI )
+ 	*current_working_directory_size = (size_t) _MAX_PATH;
+-
+-#else
+-	*current_working_directory_size = (size_t) PATH_MAX;
+-
+-#endif
+-
+ 	*current_working_directory = libcstring_narrow_string_allocate(
+ 	                              *current_working_directory_size );
+ 
+@@ -362,7 +356,6 @@ int libcpath_path_get_current_working_di
+ 
+ 		goto on_error;
+ 	}
+-#if defined( WINAPI )
+ 	if( _getcwd(
+ 	     *current_working_directory,
+ 	     *current_working_directory_size ) == NULL )
+@@ -378,9 +371,10 @@ int libcpath_path_get_current_working_di
+ 		goto on_error;
+ 	}
+ #else
+-	if( getcwd(
+-	     *current_working_directory,
+-	     *current_working_directory_size ) == NULL )
++	*current_working_directory = getcwd(
++		 NULL,
++		 0);
++	if( *current_working_directory == NULL )
+ 	{
+ 		libcerror_system_set_error(
+ 		 error,
+@@ -392,6 +386,8 @@ int libcpath_path_get_current_working_di
+ 
+ 		goto on_error;
+ 	}
++	*current_working_directory_size = 1 + libcstring_narrow_string_length(
++	                                             *current_working_directory );
+ #endif
+ 	return( 1 );
+ 
+@@ -3048,24 +3044,11 @@ int libcpath_path_get_current_working_di
+ 	*current_working_directory_size = (size_t) _MAX_PATH;
+ 
+ #else
+-	narrow_current_working_directory = libcstring_narrow_string_allocate(
+-	                                    PATH_MAX );
+-
++	narrow_current_working_directory = getcwd(
++		 NULL,
++		 0);
+ 	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 )
+-	{
+ 		libcerror_system_set_error(
+ 		 error,
+ 		 LIBCERROR_ERROR_DOMAIN_RUNTIME,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7f9d8e0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-fix-FTBFS-hurd-386.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/libpff.git



More information about the forensics-changes mailing list