Here is a patch that fixes all compilation related issues. Unfortunately it's based on 10.1. It might need a bit of tweaking to merge directly into 10.0