]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-rpmlog-fix.patch
02d49760ff3c47119c3c8f47030a3eb4 pldnotify.awk
[packages/rpm.git] / rpm-rpmlog-fix.patch
CommitLineData
eb6860b6
JB
1--- rpm-4.0.2/rpmio/rpmlog.c.orig Thu Jul 25 15:53:07 2002
2+++ rpm-4.0.2/rpmio/rpmlog.c Thu Jul 25 16:02:25 2002
3@@ -7,6 +7,18 @@
4 #include "rpmlog.h"
5 #include "debug.h"
6
7+#ifndef va_copy
8+# ifdef __va_copy
9+# define va_copy(DEST,SRC) __va_copy((DEST),(SRC))
10+# else
11+# ifdef HAVE_VA_LIST_AS_ARRAY
12+# define va_copy(DEST,SRC) (*(DEST) = *(SRC))
13+# else
14+# define va_copy(DEST,SRC) ((DEST) = (SRC))
15+# endif
16+# endif
17+#endif
18+
19 /*@access rpmlogRec @*/
20
21 static int nrecs = 0;
22@@ -116,9 +116,9 @@
23
24 /* Allocate a sufficently large buffer for output. */
25 while (1) {
26- /*@-unrecog@*/
27- nb = vsnprintf(msgbuf, msgnb, fmt, ap);
28- /*@=unrecog@*/
29+ va_list apc;
30+ /*@-sysunrecog -usedef@*/ va_copy(apc, ap); /*@=sysunrecog =usedef@*/
31+ nb = vsnprintf(msgbuf, msgnb, fmt, apc);
32 if (nb > -1 && nb < msgnb)
33 break;
34 if (nb > -1) /* glibc 2.1 */
This page took 0.044029 seconds and 4 git commands to generate.