Compiler fixes picked up from nspierbundel amlogic-common repo