mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-28 04:00:06 +08:00
Adjust va_list to work with musl
This commit is contained in:
parent
2e5751caf1
commit
a1c9051313
@ -17,8 +17,9 @@ typedef struct {
|
||||
} __va_list_struct;
|
||||
|
||||
/* Avoid conflicting definition for va_list on musl libc */
|
||||
#ifndef __DEFINED_va_list
|
||||
#if !defined __DEFINED_va_list || defined __TCC_NEEDS_va_list
|
||||
typedef __va_list_struct va_list[1];
|
||||
#undef __DEFINED_va_list
|
||||
#define __DEFINED_va_list
|
||||
#endif
|
||||
|
||||
|
6
libtcc.c
6
libtcc.c
@ -854,7 +854,11 @@ LIBTCCAPI TCCState *tcc_new(void)
|
||||
#endif
|
||||
|
||||
#if defined(TCC_MUSL)
|
||||
tcc_define_symbol(s, "__builtin_va_list", "void *");
|
||||
tcc_define_symbol(s, "__TCC_NEEDS_va_list", "");
|
||||
tcc_define_symbol(s, "__builtin_va_list", "va_list");
|
||||
tcc_define_symbol(s, "__DEFINED_va_list", "");
|
||||
tcc_define_symbol(s, "__DEFINED___isoc_va_list", "");
|
||||
tcc_define_symbol(s, "__isoc_va_list", "void *");
|
||||
#endif /* TCC_MUSL */
|
||||
|
||||
#ifdef TCC_TARGET_PE
|
||||
|
Loading…
Reference in New Issue
Block a user