X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fexecute.c;h=a6911d97b36e4cc4b4296e4cf8b19f63046fcc26;hb=1a2869593e115e4a6c74aaa0b23ca612357403ce;hp=c9f25b52d2a10fa2b8c28cb9f4f85b1d01430840;hpb=d629f6d28665184cf8970b691e48ea2dfccfa25f;p=gnulib.git diff --git a/lib/execute.c b/lib/execute.c index c9f25b52d..a6911d97b 100644 --- a/lib/execute.c +++ b/lib/execute.c @@ -154,14 +154,16 @@ execute (const char *progname, copy of the environment block - ignoring the effects of putenv() and [un]setenv(). */ { - exitcode = spawnvpe (P_WAIT, prog_path, prog_argv, environ); + exitcode = spawnvpe (P_WAIT, prog_path, (const char **) prog_argv, + (const char **) environ); if (exitcode < 0 && errno == ENOEXEC) { /* prog is not an native executable. Try to execute it as a shell script. Note that prepare_spawn() has already prepended a hidden element "sh.exe" to prog_argv. */ --prog_argv; - exitcode = spawnvpe (P_WAIT, prog_argv[0], prog_argv, environ); + exitcode = spawnvpe (P_WAIT, prog_argv[0], (const char **) prog_argv, + (const char **) environ); } } if (nulloutfd >= 0)