The build was failing with duplicate symbol errors with -fno-common. This is the default in GCC 10 and later, and explicitly enabled in some distributions to catch problems like this. There were two causes: - Prog and shadow_logfd were defined in a header file that was included in multiple other files. Fix this by defining them once in shadowlog.c, and having extern declarations in the header. - Most of the tools (except id/nologin) also define a Prog variable, which is not intended to alias the one in the library. Fix this by renaming Prog in the library to shadow_progname, which also matches the new accessor functions for it.
		
			
				
	
	
		
			3 lines
		
	
	
		
			166 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			3 lines
		
	
	
		
			166 B
		
	
	
	
		
			C
		
	
	
	
	
	
extern const char *shadow_progname; /* Program name showed in error messages */
 | 
						|
extern FILE *shadow_logfd;  /* file descripter to which error messages are printed */
 |