LibC: Fix duplicated function symbols
Commit cccb6c7287
has moved some function
definitions into complex.h. The functions were marked inline, but not
static, so a symbol definition was emited for them in any compilation
unit that included complex.h. If multiple such compilation units get
linked into the same binary, we get a duplicate symbol error.
Fix this by declaring the functions static inline.
This commit is contained in:
parent
005184e4a4
commit
8c8ba4cfe4
Notes:
sideshowbarker
2024-07-17 01:46:00 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/8c8ba4cfe4 Pull-request: https://github.com/SerenityOS/serenity/pull/20158 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/kleinesfilmroellchen ✅ Reviewed-by: https://github.com/timschumi
1 changed files with 6 additions and 6 deletions
|
@ -43,33 +43,33 @@ __BEGIN_DECLS
|
|||
// functions are here to provide external linkage to their macro implementations.
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/creal.html
|
||||
inline float(crealf)(float complex z)
|
||||
static inline float(crealf)(float complex z)
|
||||
{
|
||||
return crealf(z);
|
||||
}
|
||||
|
||||
inline double(creal)(double complex z)
|
||||
static inline double(creal)(double complex z)
|
||||
{
|
||||
return creal(z);
|
||||
}
|
||||
|
||||
inline long double(creall)(long double complex z)
|
||||
static inline long double(creall)(long double complex z)
|
||||
{
|
||||
return creall(z);
|
||||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/cimag.html
|
||||
inline double(cimag)(double complex z)
|
||||
static inline double(cimag)(double complex z)
|
||||
{
|
||||
return cimag(z);
|
||||
}
|
||||
|
||||
inline float(cimagf)(float complex z)
|
||||
static inline float(cimagf)(float complex z)
|
||||
{
|
||||
return cimagf(z);
|
||||
}
|
||||
|
||||
inline long double(cimagl)(long double complex z)
|
||||
static inline long double(cimagl)(long double complex z)
|
||||
{
|
||||
return cimagl(z);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue