Mark all external vars as thread local in linux (for now) to make errno work on linux