[libvirt] libvirt 0.8.7 LOCALSTATEDIR ubuntu patch
Eric Blake
eblake at redhat.com
Tue Feb 1 00:07:58 UTC 2011
On 01/31/2011 04:57 PM, Philipp Schmid wrote:
> -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wlogical-op -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option -DIN_LIBVIRT -I../src/conf -g -O2 -g -O2 -c nwfilter/nwfilter_ebiptables_driver.c -fPIC -DPIC -o .libs/libvirt_driver_nwfilter_la-nwfilter_ebiptables_driver.o
> nwfilter/nwfilter_ebiptables_driver.c: In function 'ebiptablesWriteToTempFile':
> nwfilter/nwfilter_ebiptables_driver.c:2444:23: error: 'LOCALSTATEDIR' undeclared (first use in this function)
Add this line to the problematic file:
#include "configmake.h"
(see nwfilter/nwfilter_driver.c for an example).
> Author: Jamie Strandboge <jamie at canonical.com>
> Description: move ebiptables script from /tmp to /var/lib/libvirt
> Forwarded: yes
>
> Index: libvirt-0.8.7/src/nwfilter/nwfilter_ebiptables_driver.c
> ===================================================================
> --- libvirt-0.8.7.orig/src/nwfilter/nwfilter_ebiptables_driver.c 2011-01-30 20:57:49.132301999 +0000
> +++ libvirt-0.8.7/src/nwfilter/nwfilter_ebiptables_driver.c 2011-01-30 20:58:35.762302000 +0000
> @@ -2441,7 +2441,7 @@
> */
> static char *
> ebiptablesWriteToTempFile(const char *string) {
> - char filename[] = "/tmp/virtdXXXXXX";
> + char filename[] = LOCAL_STATE_DIR "/lib/libvirt/virtdXXXXXX";
Better yet, we should probably have some utility function that makes it
easy to create a temporary file, while honoring $TMPDIR (if indeed it
belongs in $TMPDIR rather than /var/lib), instead of just hard-coding /tmp.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110131/219692be/attachment-0001.sig>
More information about the libvir-list
mailing list