Skip to content

Commit 61d00b4

Browse files
salahcoronyawhooo
authored andcommitted
setup.py: Explicilty use C99 for preprocessing
GCC 15 uses -std=c23 by default, which causes pycparser to error out with "pycparser.plyparser.ParseError: /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/stddef.h:450:31: before: nullptr_t". As pcyparser only supports completely C99, this shouldn't be an issue. Signed-off-by: Christopher Byrne <[email protected]>
1 parent e35ba5d commit 61d00b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,16 @@ def get_mappings(self):
189189
pdata = preprocess_file(
190190
header_path,
191191
cpp_args=[
192+
"-std=c99",
192193
"-D__builtin_va_list=char*",
193194
"-D__extension__=",
194195
"-D__attribute__(x)=",
195196
],
196197
)
197198
else:
198199
pdata = preprocess_file(
199-
header_path, cpp_args=["-D__extension__=", "-D__attribute__(x)="]
200+
header_path,
201+
cpp_args=["-std=c99", "-D__extension__=", "-D__attribute__(x)="],
200202
)
201203
parser = c_parser.CParser()
202204
ast = parser.parse(pdata, "tss2_tpm2_types.h")
@@ -218,6 +220,7 @@ def get_mappings(self):
218220
pdata = preprocess_file(
219221
policy_header_path,
220222
cpp_args=[
223+
"-std=c99",
221224
"-D__builtin_va_list=char*",
222225
"-D__extension__=",
223226
"-D__attribute__(x)=",
@@ -229,6 +232,7 @@ def get_mappings(self):
229232
pdata = preprocess_file(
230233
policy_header_path,
231234
cpp_args=[
235+
"-std=c99",
232236
"-D__extension__=",
233237
"-D__attribute__(x)=",
234238
"-D__float128=long double",

0 commit comments

Comments
 (0)