[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#127472: does not build from source on powerpc and s390



Package: libsafe
Version: 2.0-9-1
Severity: serious
Tags: patch


Hi,
libsafe doesn't build from source on s390 and powerpc. va_list assignment is 
not portable. Please use the attached patch. For details of the error see

http://buildd.debian.org/build.php?arch=&pkg=libsafe
--- libsafe-2.0-9/src/intercept.c	Thu Nov 29 21:34:30 2001
+++ libsafe-2.0-9-s390/src/intercept.c	Wed Jan  2 16:20:13 2002
@@ -576,7 +576,8 @@
 	/*
 	 * We have to save a copy of ap, since va_arg() will modify it.
 	 */
-	va_list orig_ap = ap;
+	va_list orig_ap;
+	__va_copy(orig_ap, ap);
 
 	for (; count>0; count--) {
 	    p = va_arg(ap, char *);
@@ -585,7 +586,7 @@
 	    }
 	}
 
-	ap = orig_ap;
+	__va_copy(ap, orig_ap);
     }
 
     res = real_vfprintf(fp, format, ap);
@@ -645,7 +646,8 @@
 	/*
 	 * We have to save a copy of ap, since va_arg() will modify it.
 	 */
-	va_list orig_ap = ap;
+	va_list orig_ap;
+	__va_copy(orig_ap, ap);
 
 	for (; count>0; count--) {
 	    p = va_arg(ap, char *);
@@ -654,7 +656,7 @@
 	    }
 	}
 
-	ap = orig_ap;
+	__va_copy(ap, orig_ap);
     }
 
     res = real_vfprintf(fp, format, ap);

Reply to: