From: Ryota Ozaki Date: Thu, 8 Jul 2010 11:42:22 +0000 (+0900) Subject: daemon: dispatch.c should include stdio.h (and stdarg.h) X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a3fc67a12cc00086149a0ec3e3089a3ca4361185;p=libvirt.git daemon: dispatch.c should include stdio.h (and stdarg.h) 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. --- diff --git a/daemon/dispatch.c b/daemon/dispatch.c index 8f55eaaf66..966db71ea4 100644 --- a/daemon/dispatch.c +++ b/daemon/dispatch.c @@ -23,6 +23,9 @@ #include +#include +#include + #include "dispatch.h" #include "remote.h"