Skip to content

Commit fe035ab

Browse files
committed
SpacemiT: OpenSBI: Fix bool definition
GCC-15 build support Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
1 parent 8555300 commit fe035ab

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
From 6058c8ba1cc525b2d9e5caa48928f9226810dfe7 Mon Sep 17 00:00:00 2001
2+
From: Patrick Yavitz <pyavitz@gmail.com>
3+
Date: Fri, 15 May 2026 08:11:09 -0400
4+
Subject: [PATCH] Fix bool definition
5+
6+
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
7+
---
8+
include/sbi/sbi_types.h | 12 ++++++------
9+
1 file changed, 6 insertions(+), 6 deletions(-)
10+
11+
diff --git a/include/sbi/sbi_types.h b/include/sbi/sbi_types.h
12+
index def88bb..3691289 100644
13+
--- a/include/sbi/sbi_types.h
14+
+++ b/include/sbi/sbi_types.h
15+
@@ -1,5 +1,4 @@
16+
-/*
17+
- * SPDX-License-Identifier: BSD-2-Clause
18+
+/* SPDX-License-Identifier: BSD-2-Clause
19+
*
20+
* Copyright (c) 2019 Western Digital Corporation or its affiliates.
21+
*
22+
@@ -14,6 +13,8 @@
23+
24+
/* clang-format off */
25+
26+
+#include <stdbool.h>
27+
+
28+
typedef char s8;
29+
typedef unsigned char u8;
30+
typedef unsigned char uint8_t;
31+
@@ -44,7 +45,6 @@ typedef unsigned long long uint64_t;
32+
#error "Unexpected __riscv_xlen"
33+
#endif
34+
35+
-typedef int bool;
36+
typedef unsigned long ulong;
37+
typedef unsigned long uintptr_t;
38+
typedef unsigned long size_t;
39+
@@ -88,8 +88,8 @@ typedef uint64_t be64_t;
40+
#endif
41+
42+
#define container_of(ptr, type, member) ({ \
43+
- const typeof(((type *)0)->member) * __mptr = (ptr); \
44+
- (type *)((char *)__mptr - offsetof(type, member)); })
45+
+ const typeof(((type *)0)->member) * __mptr = (ptr); \
46+
+ (type *)((char *)__mptr - offsetof(type, member)); })
47+
48+
#define array_size(x) (sizeof(x) / sizeof((x)[0]))
49+
50+
@@ -111,7 +111,7 @@ typedef uint64_t be64_t;
51+
* external definitions of data types and common macros.
52+
* OPENSBI_EXTERNAL_SBI_TYPES is the file name to external header file,
53+
* the external build system should address the additional include
54+
- * directory ccordingly.
55+
+ * directory accordingly.
56+
*/
57+
58+
#define XSTR(x) #x
59+
--
60+
2.53.0
61+

0 commit comments

Comments
 (0)