[Libguestfs] Missing stdarg.h include

Richard W.M. Jones
Fri, 05 Nov 2010 12:05:49 -0000

On Fri, Nov 05, 2010 at 01:45:19AM +0100, Guido G?nther
wrote:
> Hi,
> building current git fails with
>
> gcc -std=gnu99 -std=gnu99 -I.. -I/usr/lib/ocaml -I../ocaml -I../src
-I../src   -g -O2 -fPIC -Wall -c guestfs_c_actions.c
> In file included from ../src/guestfs.h:84,
>                  from guestfs_c_actions.c:35:
> ../src/guestfs-actions.h:28: error: expected declaration specifiers or
'...' before 'va_list'
>
> This is fixed by an
>
> 	#include <stdarg.h>
>
> but since this file is autogenrated in some ocaml magic it'd I'm
not
> sure what's the best place to fix this.

In generator_ocaml.ml:

$ grep guestfs_c_actions.c generator/*.ml
generator/generator_main.ml:  output_to "ocaml/guestfs_c_actions.c"
generate_ocaml_c;
$ grep generate_ocaml_c generator/*.ml
generator/generator_main.ml:  output_to "ocaml/guestfs_c_actions.c"
generate_ocaml_c;
generator/generator_ocaml.ml:and generate_ocaml_c ()
It's a bit strange that it compiles over here.  Different version of
gcc perhaps?  Anyway I can add that header easily enough.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.