Fix a bunch of errors in linaro 4.9.2