From: Patrick McHardy <kaber@trash.net>
To: Max Kellermann <max@duempel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
netfilter-devel@lists.netfilter.org
Subject: Re: nfsim on amd64: va_list incompatible type error
Date: Fri, 07 Jan 2005 01:30:16 +0100 [thread overview]
Message-ID: <41DDD818.3090104@trash.net> (raw)
In-Reply-To: <20050106235748.GA23714@roonstrasse.net>
[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]
Max Kellermann wrote:
>gcc -Wmissing-prototypes -Wstrict-prototypes -Wunused -Wall -g -Wa,-W
>-I. -I/home/max/svn/nfsim/core -I/home/max/svn/nfsim/kernelenv/include
>-I/home/max/svn/nfsim/netfilter/include -c -o core/talloc.o
>core/talloc.c
>core/talloc.c: In function `talloc_vasprintf':
>core/talloc.c:862: error: incompatible types in assignment
>core/talloc.c:868: error: incompatible types in assignment
>core/talloc.c: In function `talloc_vasprintf_append':
>core/talloc.c:906: error: incompatible types in assignment
>core/talloc.c:918: error: incompatible types in assignment
>
>both gcc 1:3.3.5-5 and 3.4.3-6 (Debian) are affected. I found several
>references to this behaviour on the net, one is a gcc bug report:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8262
>
>.. but I fail to understand how to go around this limitation. When I
>defined HAVE_VA_COPY as a workaround, the error went away. Where is
>HAVE_VA_COPY meant to be defined?
>
I used the same workaround, but this patch should be better. In
samba HAVE_VA_COPY is probably defined by autoconf, but nfsim
doesn't use autoconf.
Regards
Patrick
[-- Attachment #2: 05.diff --]
[-- Type: text/x-patch, Size: 1462 bytes --]
Index: Makefile.in
===================================================================
--- Makefile.in (revision 3579)
+++ Makefile.in (working copy)
@@ -5,8 +5,9 @@
BINDIR=%BINDIR%
LIBDIR=%LIBDIR%
BASEDIR=%BASEDIR%
+VA_COPY=%VA_COPY%
-CFLAGS = -Wmissing-prototypes -Wstrict-prototypes -Wunused -Wall -g -Wa,-W
+CFLAGS = -Wmissing-prototypes -Wstrict-prototypes -Wunused -Wall -g -Wa,-W $(VA_COPY)
CPPFLAGS = -I. -I$(shell pwd)/core -I$(shell pwd)/kernelenv/include \
-I$(shell pwd)/netfilter/include
Index: configure
===================================================================
--- configure (revision 3579)
+++ configure (working copy)
@@ -38,8 +38,19 @@
[ -n "$BINDIR" ] || BINDIR="$PREFIX"/bin/
[ -n "$LIBDIR" ] || LIBDIR="$PREFIX"/lib/
-SUB='s@%GCOVFLAGS%@'$GCOVFLAGS'@;s@%TYPE%@'$TYPE'@;s@%VERSION%@'$VERSION'@;s@%GCOV%@'$GCOV'@;s@%CC%@'$CC'@;s@%LIBDIR%@'$LIBDIR'@;s@%BINDIR%@'$BINDIR'@;s@%BASEDIR%@'$BASEDIR'@'
+echo "
+#include <stdarg.h>
+int main(int argc, char **argv)
+{
+ va_list ap1, ap2;
+ va_copy(ap1, ap2);
+ exit(0);
+}" >.va_copy.c
+gcc .va_copy.c -o /dev/null 2>/dev/null && VA_COPY="-DHAVE_VA_COPY"
+rm .va_copy.c
+SUB='s@%GCOVFLAGS%@'$GCOVFLAGS'@;s@%TYPE%@'$TYPE'@;s@%VERSION%@'$VERSION'@;s@%GCOV%@'$GCOV'@;s@%CC%@'$CC'@;s@%LIBDIR%@'$LIBDIR'@;s@%BINDIR%@'$BINDIR'@;s@%BASEDIR%@'$BASEDIR'@;s@%VA_COPY%@'$VA_COPY'@'
+
[ -d $KERNELDIR/net/$TYPE/netfilter ] ||
barf No netfilter directory found in $KERNELDIR
prev parent reply other threads:[~2005-01-07 0:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-06 23:57 nfsim on amd64: va_list incompatible type error Max Kellermann
2005-01-07 0:30 ` Patrick McHardy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41DDD818.3090104@trash.net \
--to=kaber@trash.net \
--cc=max@duempel.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.