Index: function_reordering_plugin/function_reordering_plugin.c =================================================================== --- function_reordering_plugin/function_reordering_plugin.c (revision 184564) +++ function_reordering_plugin/function_reordering_plugin.c (working copy) @@ -43,11 +43,23 @@ along with this program; see the file COPYING3. I #include #include #include -#include +#if defined (__ELF__) + #include +#endif #include "config.h" #include "plugin-api.h" #include "callgraph.h" +/* #include Not available on Darwin. + Rather than dealing with cross-compilation includes, hard code the + values we need, as these will not change. */ +#ifndef SHT_NULL + #define SHT_NULL 0 +#endif +#ifndef SHT_PROGBITS + #define SHT_PROGBITS 1 +#endif + enum ld_plugin_status claim_file_hook (const struct ld_plugin_input_file *file, int *claimed); enum ld_plugin_status all_symbols_read_hook ();