From e6bac87d0eaab116878a04874bc5b6a3496cb938 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 27 Apr 2011 16:06:33 -0400 Subject: correct variadic prototypes for execl* family the old versions worked, but conflicted with programs which declared their own prototypes and generated warnings with some versions of gcc. --- src/process/execle.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/process/execle.c') diff --git a/src/process/execle.c b/src/process/execle.c index 37f629d9..64908366 100644 --- a/src/process/execle.c +++ b/src/process/execle.c @@ -1,19 +1,20 @@ #include #include -int execle(const char *path, ...) +int execle(const char *path, const char *argv0, ...) { int argc; va_list ap; - va_start(ap, path); - for (argc=0; va_arg(ap, const char *); argc++); + va_start(ap, argv0); + for (argc=1; va_arg(ap, const char *); argc++); va_end(ap); { int i; char *argv[argc+1]; char **envp; - va_start(ap, path); - for (i=0; i