summaryrefslogtreecommitdiff
path: root/meta-arm/meta-arm/recipes-bsp/hafnium/hafnium/0001-define-_Noreturn-if-needed.patch
blob: 6f61177ac3d7f3387939c26c61673ede6cc63f6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From a433727e0fe8424db984f3afa2bda898dd517e9d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 19 Apr 2022 22:32:56 -0700
Subject: [PATCH] define _Noreturn if needed

The new _Noreturn function specifier is not recognized by the parser and shows as a syntax error:

Fixes
../git/inc/hf/panic.h:13:1: error: '_Noreturn' is a C11 extension [-Werror,-Wc11-extensions]
noreturn void panic(const char *fmt, ...);
^

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 inc/hf/panic.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/inc/hf/panic.h b/inc/hf/panic.h
index ec864e4..588f119 100644
--- a/inc/hf/panic.h
+++ b/inc/hf/panic.h
@@ -10,4 +10,8 @@
 
 #include <stdnoreturn.h>
 
+#ifndef _Noreturn
+#define _Noreturn __attribute__ ((noreturn))
+#endif
+
 noreturn void panic(const char *fmt, ...);