diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2025-09-02 18:02:42 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-02 12:02:42 +0200 |
| commit | 28d07f9bf03c76013db8d15477e8d1f46d1b930d (patch) | |
| tree | 4f092e065b9dea4eacee63fd3f384b5244963fa2 | |
| parent | 994ce41adc2efb811d890dfd28c1d37841630b01 (diff) | |
| download | box64-28d07f9bf03c76013db8d15477e8d1f46d1b930d.tar.gz box64-28d07f9bf03c76013db8d15477e8d1f46d1b930d.zip | |
[WRAPPERHELPER] Added legacy __attribute support (#2996)
| -rw-r--r-- | wrapperhelper/include-override/common/stdc-predef.h | 1 | ||||
| -rw-r--r-- | wrapperhelper/src/parse.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/wrapperhelper/include-override/common/stdc-predef.h b/wrapperhelper/include-override/common/stdc-predef.h index 3484bbce..52c07ac2 100644 --- a/wrapperhelper/include-override/common/stdc-predef.h +++ b/wrapperhelper/include-override/common/stdc-predef.h @@ -1,2 +1,3 @@ // Ignore all attributes #define __attribute__(_) +#define __attribute(_) diff --git a/wrapperhelper/src/parse.c b/wrapperhelper/src/parse.c index eba462bf..7d55eaf5 100644 --- a/wrapperhelper/src/parse.c +++ b/wrapperhelper/src/parse.c @@ -2129,7 +2129,7 @@ parse_cur_token_decl: } char *ident = string_steal(tok->tokv.str); *tok = proc_next_token(prep); - while ((tok->tokt == PTOK_IDENT) && !strcmp(string_content(tok->tokv.str), "__attribute__")) { + while ((tok->tokt == PTOK_IDENT) && (!strcmp(string_content(tok->tokv.str), "__attribute__") || !strcmp(string_content(tok->tokv.str), "__attribute"))) { // Attribute string_del(tok->tokv.str); *tok = proc_next_token(prep); |