[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] [PATCH] Cast args/env for execve in virCommand
- From: Cole Robinson <crobinso redhat com>
- To: "Daniel P. Berrange" <berrange redhat com>
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] [PATCH] Cast args/env for execve in virCommand
- Date: Thu, 12 May 2011 12:41:24 -0400
On 05/12/2011 12:29 PM, Daniel P. Berrange wrote:
> 'char **' is not compatible with 'const char* const*' so needs
> an explicit cast. Fixes the build on MinGW
>
> * src/util/command.c: Cast args/env for execve
> ---
> src/util/command.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/src/util/command.c b/src/util/command.c
> index 78586e8..d63b984 100644
> --- a/src/util/command.c
> +++ b/src/util/command.c
> @@ -1000,7 +1000,9 @@ int virCommandExec(virCommandPtr cmd)
> return -1;
> }
>
> - return execve(cmd->args[0], cmd->args, cmd->env);
> + return execve(cmd->args[0],
> + (const char *const *)cmd->args,
> + (const char *const *)cmd->env);
> }
>
> /*
ACK
- Cole
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]