mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
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:
1 parent
005184e4a4
commit
8c8ba4cfe4
1 file changed
+6
-6
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user