Use of asprintf() breaks build on systems where asprintf() is not available
Hi,
A few source-files, e.g. vnc.c, makes use of the (non-portable?) asprintf() function, which is not available in e.g. Solaris 10 and certain builds of OpenSolaris.
What would be the proper "qemu" way of solving this problem? Creating a library with the functions not avilable on the host system or replacing the non-portable use(s) of the function(s) with proper portable function(s)?
Regards
Palle
Quoted 5 lines · Palle Lyckegaard
Hi,
A few source-files, e.g.
vnc.c, makes use of the (non-portable?)asprintf()function, which is not available in e.g. Solaris 10 and certain builds of OpenSolaris.What would be the proper "qemu" way of solving this problem? Creating a library with the functions not avilable on the host system or replacing the non-portable use(s) of the function(s) with proper portable function(s)?
Dan,
Can you send in a patch to add the gnulib asprintf() with an appropriate configure test?
Regards,
Anthony Liguori
Quoted 6 lines
Regards
Palle
Quoted 7 lines · Anthony Liguori
Quoted 6 lines · Palle Lyckegaard
Hi,
A few source-files, e.g.
vnc.c, makes use of the (non-portable?)asprintf()function, which is not available in e.g. Solaris 10 and certain builds of OpenSolaris.
Quoted 7 lines
Quoted 4 lines
What would be the proper "qemu" way of solving this problem? Creating a library with the functions not avilable on the host system or replacing the non-portable use(s) of the function(s) with proper portable function(s)?
Can you send in a patch to add the gnulib
asprintf()with an appropriate configure test?
I think it is just easier to remove the use of asprinf() from vnc.c It is only used once and not really all that hard to remove.
Daniel
Signature · 4 lines
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
Quoted 8 lines · Daniel P. Berrange
Quoted 6 lines · Anthony Liguori
Quoted 4 lines · Palle Lyckegaard
Hi,
A few source-files, e.g.
vnc.c, makes use of the (non-portable?)asprintf()function, which is not available in e.g. Solaris 10 and certain builds of OpenSolaris.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
What would be the proper "qemu" way of solving this problem? Creating a library with the functions not avilable on the host system or replacing the non-portable use(s) of the function(s) with proper portable function(s)?
Can you send in a patch to add the gnulib
asprintf()with an appropriate configure test?I think it is just easier to remove the use of
asprinf()fromvnc.cIt is only used once and not really all that hard to remove.
That would be good too.
Regards,
Anthony Liguori
Quoted 2 lines
Daniel