On 05.07.2013 14:55:32, Marin Ramesa wrote: > Putting 'extern int _setjmp(jmp_buf_t*)' to i386/i386/setjmp.h > removes three implicit declaration warnings.
Actually four, if db_trap.c includes <machine/setjmp.h>.
* ddb/db_trap.c: Include <machine/setjmp.h>. * i386/i386/setjmp.h (_setjmp): Add prototype.
From 5d45a0bbbb928eb803e776e8da0525457556808b Mon Sep 17 00:00:00 2001 From: Marin Ramesa <marin.ram...@gmail.com> Date: Sat, 6 Jul 2013 22:21:35 +0200 Subject: [PATCH 2/2] fix implicit declarations --- ddb/db_trap.c | 1 + i386/i386/setjmp.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ddb/db_trap.c b/ddb/db_trap.c index 395a9b5..8f59a36 100644 --- a/ddb/db_trap.c +++ b/ddb/db_trap.c @@ -35,6 +35,7 @@ */ #include <mach/boolean.h> #include <machine/db_machdep.h> +#include <machine/setjmp.h> #include <ddb/db_command.h> #include <ddb/db_access.h> #include <ddb/db_break.h> diff --git a/i386/i386/setjmp.h b/i386/i386/setjmp.h index 21c856d..162217a 100644 --- a/i386/i386/setjmp.h +++ b/i386/i386/setjmp.h @@ -33,4 +33,6 @@ typedef struct jmp_buf { int jmp_buf[6]; /* ebx, esi, edi, ebp, esp, eip */ } jmp_buf_t; +extern int _setjmp(jmp_buf_t*); + #endif /* _I386_SETJMP_H_ */ -- 1.8.1.4