fix autolib for gcc3+
diff --git a/include/u.h b/include/u.h index d062a9d..b7319ae 100644 --- a/include/u.h +++ b/include/u.h
@@ -116,6 +116,16 @@ */ #define AUTOLIB(x) static int __p9l_autolib_ ## x = 1; +/* + * Gcc 3 is too smart for its own good. + */ +#if defined(__GNUC__) +# if __GNUC__ >= 3 +# undef AUTOLIB +# define AUTOLIB(x) int __p9l_autolib_ ## x __attribute__ ((weak)); +# endif +#endif + #if defined(__cplusplus) } #endif