The header needs stdint.h which it was only getting because it was included after stdint.h in the cpp file. Stop including standard headers before other ArduPilot headers