diff options
Diffstat (limited to 'kern/bootstrap.c')
-rw-r--r-- | kern/bootstrap.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kern/bootstrap.c b/kern/bootstrap.c index c3c971d..d6dcad4 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -43,7 +43,7 @@ #include <vm/vm_kern.h> #include <device/device_port.h> -#include <sys/varargs.h> +#include <stdarg.h> #include <mach/machine/multiboot.h> #include <mach/exec/exec.h> @@ -335,9 +335,7 @@ extern vm_offset_t user_stack_low(); extern vm_offset_t set_user_regs(); void -static build_args_and_stack(boot_exec_info, va_alist) - struct exec_info *boot_exec_info; - va_dcl +static build_args_and_stack(struct exec_info *boot_exec_info, ...) { vm_offset_t stack_base; vm_size_t stack_size; @@ -358,7 +356,7 @@ static build_args_and_stack(boot_exec_info, va_alist) /* * Calculate the size of the argument list. */ - va_start(argv_ptr); + va_start(argv_ptr, boot_exec_info); arg_len = 0; arg_count = 0; for (;;) { @@ -417,7 +415,7 @@ static build_args_and_stack(boot_exec_info, va_alist) /* * Then the strings and string pointers for each argument */ - va_start(argv_ptr); + va_start(argv_ptr, boot_exec_info); while (--arg_count >= 0) { arg_ptr = va_arg(argv_ptr, char *); arg_item_len = strlen(arg_ptr) + 1; /* include trailing 0 */ |