[libvirt] [PATCH] 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. --- daemon/dispatch.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/daemon/dispatch.c b/daemon/dispatch.c index 8f55eaa..966db71 100644 --- a/daemon/dispatch.c +++ b/daemon/dispatch.c @@ -23,6 +23,9 @@ #include <config.h> +#include <stdio.h> +#include <stdarg.h> + #include "dispatch.h" #include "remote.h" -- 1.6.6.1

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 | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Indeed, ACK. Jirka

On Thu, Jul 8, 2010 at 9:45 PM, Jiri Denemark <jdenemar@redhat.com> wrote:
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 | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Indeed, ACK.
Thanks, Jiri. and if someone has time, please push it ;-) ozaki-r
Jirka

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 | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Indeed, ACK.
Thanks, Jiri. and if someone has time, please push it ;-)
Ah sorry, pushed now. Jirka
participants (2)
-
Jiri Denemark
-
Ryota Ozaki