if we include standard headers on glibc-based systems then we can't use '__attribute__' (those are defined away for unknown compilers) but must use '__attribute' (or #undef that token).
Unified · Split
| @@ -25,7 +25,7 @@ void cleanup4(int ret, void *arg) · 24 unmodified lines | |||
| 25 | printf ("%d %s\n", ret, (char *) arg); | 25 | printf ("%d %s\n", ret, (char *) arg); |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | void __attribute__((destructor)) cleanup5(void) | 28 | void __attribute((destructor)) cleanup5(void) |
| 29 | { | 29 | { |
| 30 | printf ("cleanup5\n"); | 30 | printf ("cleanup5\n"); |
| 31 | } | 31 | } |