diff --git a/arch/um/include/init.h b/arch/um/include/init.h index b00a95741d41..37dd097c16c0 100644 --- a/arch/um/include/init.h +++ b/arch/um/include/init.h @@ -45,12 +45,20 @@ typedef void (*exitcall_t)(void); # define __section(S) __attribute__ ((__section__(#S))) #endif +#if __GNUC__ == 3 + #if __GNUC_MINOR__ >= 3 # define __used __attribute__((__used__)) #else # define __used __attribute__((__unused__)) #endif +#else +#if __GNUC__ == 4 +# define __used __attribute__((__used__)) +#endif +#endif + #else #include #endif