6D: enable stubs and fix compilation errors
Created originally on Bitbucket by nikfreak
Was already merged in Bitbucket before import, marked as merged by the import user
Source changeset not longer availableat the time of import. Commit listwill look empty