]> xenbits.xensource.com Git - libvirt.git/commitdiff
daemon: dispatch.c should include stdio.h (and stdarg.h)
authorRyota Ozaki <ozaki.ryota@gmail.com>
Thu, 8 Jul 2010 11:42:22 +0000 (20:42 +0900)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 15 Jul 2010 07:27:47 +0000 (09:27 +0200)
dispatch.c requires stdio.h (and stdarg.h), however, currently
dispatch.c implicitly relys on rpc/xdr.h to include stdio.h.
If rpc/xdr.h unxpectedly does not include stdio.h, the compilation
of dispatch.c fails.

This can happen, for example, when portablexdr is installed
under /usr/local; because portablexdr's rpc/xdr.h does not
include stdio.h and gcc looks up it not /usr/include/rpc/xdr.h.

Note that stdarg.h is also included according to man va_start,
although stdio.h seems including it anyway.

daemon/dispatch.c

index 8f55eaaf668c0f17a3ad2ea5af63154da8f1ecae..966db71ea4db08baedac31d2602caa00143db39b 100644 (file)
@@ -23,6 +23,9 @@
 
 #include <config.h>
 
+#include <stdio.h>
+#include <stdarg.h>
+
 #include "dispatch.h"
 #include "remote.h"