Package: ifhp
Version: 3.5.20-12.1
Severity: normal
Tags: patch

Hello dear maintainer,

With reference to the above subject your package failed to build on
ubuntu due to gcc 4.4 and it is better to use
write_fd_str/write_fd_len rather than plain write while writing status
file

The attached patch applied in ubuntu incorporates the same

regards

-- 

Bhavani Shankar.R
https://launchpad.net/~bhavi, a proud ubuntu community  member.
What matters in life is application of mind!,
It makes great sense to have some common sense..!
diff -Nru ifhp-3.5.20/debian/patches/60-fix_memset_arguments.patch ifhp-3.5.20/debian/patches/60-fix_memset_arguments.patch
--- ifhp-3.5.20/debian/patches/60-fix_memset_arguments.patch	1970-01-01 05:30:00.000000000 +0530
+++ ifhp-3.5.20/debian/patches/60-fix_memset_arguments.patch	2010-08-01 12:47:39.000000000 +0530
@@ -0,0 +1,15 @@
+Author: Colin Watson <cjwat...@ubuntu.com>
+Description: Patch to fix transposed arguments to memset, which caused a build failure.
+
+--- ifhp-3.5.20.orig/src/ifhp.c
++++ ifhp-3.5.20/src/ifhp.c
+@@ -672,7 +672,7 @@ void getargs( int argc, char **argv )
+ 	}
+ 	DEBUG1("getargs: finished options");
+ 	/* set the Topts and Zopts values */
+-	memset(m,sizeof(m),0);
++	memset(m,0,sizeof(m));
+ 	m[0] = m[1] = 0;
+ 	for( i = 'a'; i <= 'z'; ++i ){
+ 		m[0] = i;
+
diff -Nru ifhp-3.5.20/debian/patches/61-replace_plain_write.patch ifhp-3.5.20/debian/patches/61-replace_plain_write.patch
--- ifhp-3.5.20/debian/patches/61-replace_plain_write.patch	1970-01-01 05:30:00.000000000 +0530
+++ ifhp-3.5.20/debian/patches/61-replace_plain_write.patch	2010-08-01 12:52:22.000000000 +0530
@@ -0,0 +1,19 @@
+Author: Colin Watson <cjwat...@ubuntu.com>
+Description: Parch to use Write_fd_str/Write_fd_len rather than plain write when writing the status file.
+
+--- ifhp-3.5.20.orig/src/errormsg.c
++++ ifhp-3.5.20/src/errormsg.c
+@@ -539,11 +539,11 @@ void setstatus( char *msg, char *details
+ 					buffer[n] = 0;
+ 					if( (s = strchr(buffer,'\n')) ){
+ 						*s++ = 0;
+-						write(temp_fd, s,strlen(s));
++						Write_fd_str(temp_fd, s);
+ 					}
+ 				}
+ 				while( (n = read(Status_fd, buffer,sizeof(buffer)-1)) > 0 ){
+-					write(temp_fd, buffer,n);
++					Write_fd_len(temp_fd, buffer,n);
+ 				}
+ 				close( Status_fd );
+ 				close( temp_fd );
diff -Nru ifhp-3.5.20/debian/patches/series ifhp-3.5.20/debian/patches/series
--- ifhp-3.5.20/debian/patches/series	2010-05-17 09:38:57.000000000 +0530
+++ ifhp-3.5.20/debian/patches/series	2010-08-01 13:01:09.000000000 +0530
@@ -4,3 +4,5 @@
 50-configure.in.patch
 51-libtoolize-2.2.6b--ltmain.sh.patch
 debian-changes-3.5.20-12.1
+60-fix_memset_arguments.patch
+61-replace_plain_write.patch

Reply via email to