mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:12:44 +00: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:
		
							parent
							
								
									005184e4a4
								
							
						
					
					
						commit
						8c8ba4cfe4
					
				
					 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.
 | // functions are here to provide external linkage to their macro implementations.
 | ||||||
| 
 | 
 | ||||||
| // https://pubs.opengroup.org/onlinepubs/9699919799/functions/creal.html
 | // 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); |     return crealf(z); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| inline double(creal)(double complex z) | static inline double(creal)(double complex z) | ||||||
| { | { | ||||||
|     return creal(z); |     return creal(z); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| inline long double(creall)(long double complex z) | static inline long double(creall)(long double complex z) | ||||||
| { | { | ||||||
|     return creall(z); |     return creall(z); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // https://pubs.opengroup.org/onlinepubs/9699919799/functions/cimag.html
 | // 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); |     return cimag(z); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| inline float(cimagf)(float complex z) | static inline float(cimagf)(float complex z) | ||||||
| { | { | ||||||
|     return cimagf(z); |     return cimagf(z); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| inline long double(cimagl)(long double complex z) | static inline long double(cimagl)(long double complex z) | ||||||
| { | { | ||||||
|     return cimagl(z); |     return cimagl(z); | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sergey Bugaev
						Sergey Bugaev