[Forensics-changes] [libbfio] 01/02: Fix FTBFS on hurd-386 (Closes: #754792)
Pierre Chifflier
pollux at moszumanska.debian.org
Wed Aug 27 07:07:20 UTC 2014
This is an automated email from the git hooks/post-receive script.
pollux pushed a commit to branch master
in repository libbfio.
commit 0a0fcd11baffac4a995a80e97612236de389714b
Author: Pierre Chifflier <pollux at debian.org>
Date: Wed Aug 27 09:02:24 2014 +0200
Fix FTBFS on hurd-386 (Closes: #754792)
---
debian/patches/01-fix-FTBFS-hurd-386.patch | 85 ++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 86 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..c953f87
--- /dev/null
+++ b/debian/patches/01-fix-FTBFS-hurd-386.patch
@@ -0,0 +1,85 @@
+Index: libbfio/libcpath/libcpath_path.c
+===================================================================
+--- libbfio.orig/libcpath/libcpath_path.c
++++ libbfio/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
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/libbfio.git
More information about the forensics-changes
mailing list