x86: provide typedef jmp_buf
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 1 Oct 2022 13:00:22 +0000 (15:00 +0200)
committerSimon Glass <sjg@chromium.org>
Sat, 29 Oct 2022 13:36:33 +0000 (07:36 -0600)
The jmp_buf type is required by the C99 specification.
Defining it for x86 fixes building the longjmp unit test.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/x86/include/asm/setjmp.h

index 49c36c1..15915d0 100644 (file)
@@ -34,7 +34,9 @@ struct jmp_buf_data {
 
 #endif
 
-int setjmp(struct jmp_buf_data *jmp_buf);
-void longjmp(struct jmp_buf_data *jmp_buf, int val);
+typedef struct jmp_buf_data jmp_buf[1];
+
+int setjmp(jmp_buf env);
+void longjmp(jmp_buf env, int val);
 
 #endif